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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to