[clang] [ItaniumMangle] Fix `cp` versus `cl` call expression mangling for block scope (PR #114884)
Hubert Tong via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 4 17:54:12 PST 2024
hubert-reinterpretcast wrote:
> Can we find a way to re-use the code between this and the actual lookup code? Feels like we could have some sort of predicate like `doesLookupResultSuppressADL(NamedDecl*)`. Or are we forced to use slightly different predicates for some compatibility reason?
`Sema::UseArgumentDependentLookup` in `clang/lib/Sema/SemaExpr.cpp` seems to have similar logic; but, in the context of the name mangler, we take advantage of whether `Sema` created an `UnresolvedLookupExpr` (including whether `Sema` applied overload resolution to a case where the call is not dependent).
Furthermore, considering the planned `ClangABICompat` change and the possible impact of CWG 2946 (e.g., mangling class-scope lookup results for friend declarations), I think the flow of the logic will diverge such that attempting to share a predicate now would not help.
https://github.com/llvm/llvm-project/pull/114884
More information about the cfe-commits
mailing list