[clang] [clang] [C++20] [Modules] Don't profile UnresolvedLookupExpr in require clause and noexcept clause (PR #194283)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 27 20:19:32 PDT 2026
================
@@ -4035,7 +4035,15 @@ void FunctionProtoType::Profile(llvm::FoldingSetNodeID &ID, QualType Result,
for (QualType Ex : epi.ExceptionSpec.Exceptions)
ID.AddPointer(Ex.getAsOpaquePtr());
} else if (isComputedNoexcept(epi.ExceptionSpec.Type)) {
- epi.ExceptionSpec.NoexceptExpr->Profile(ID, Context, Canonical);
+ // Make sure the profiling result of the noexcept expression
+ // won't be affected by the unresolved lookup expressions.
+ // See clang/test/Modules/polluted-operator.cppm for an example
+ // for it.
+ //
+ // ProfileLambdaExpr=false is the default value.
+ epi.ExceptionSpec.NoexceptExpr->Profile(
+ ID, Context, Canonical, /*ProfileLambdaExpr=*/false,
+ /*IgnoringUnresolvedLookupExpr=*/true);
----------------
ChuanqiXu9 wrote:
Adding some path to only ignore it when we're merging entities.
https://github.com/llvm/llvm-project/pull/194283
More information about the cfe-commits
mailing list