Skip to content

Commit

Permalink
Fix inConstraintSubstitution()
Browse files Browse the repository at this point in the history
  • Loading branch information
zyn0217 committed Jan 10, 2025
1 parent 078d363 commit 375253d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clang/include/clang/Sema/Sema.h
Original file line number Diff line number Diff line change
Expand Up @@ -13509,7 +13509,8 @@ class Sema final : public SemaBase {

/// Determine whether we are currently performing constraint substitution.
bool inConstraintSubstitution() const {
return CodeSynthesisContexts.size() > NonConstraintSubstitutionEntries;
return NonConstraintSubstitutionEntries &&
CodeSynthesisContexts.size() >= NonConstraintSubstitutionEntries;
}

using EntityPrinter = llvm::function_ref<void(llvm::raw_ostream &)>;
Expand Down

0 comments on commit 375253d

Please sign in to comment.