ilya-biryukov wrote:

> It's just that a canonical template parameter type doesn't refer to a 
> particular template parameter declaration.

The particular statement is that Clang canonicalizes `decltype(func<T>())` to 
`decltype(func<FirstOccurrenceOfTWithSameDepthAndIndex>())`.  If we don't 
change that, we end up with spurious false positives from ODR checking (I 
believe that's one of the reasons why it's disabled in C++20 header units), 
effectively turning off all the checks and not just weakening them for template 
parameters.

I feel that this change is a better trade-off, at least that's the best idea 
for tactically reducing the false positive rate (at the cost of some false 
negatives).

> This change weakens the ODR checker beyond what the fix should require.
> I can't give a more thorough review at this time since I am still traveling 
> from the WG21 meeting.

👍 eager to hear better suggestions and safe travels.

https://github.com/llvm/llvm-project/pull/144796
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to