[PATCH] D86048: [AST][RecoveryExpr] Popagate the error-bit from a VarDecl's initializer to DeclRefExpr.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 15 11:20:59 PDT 2020


hokein added a comment.

In D86048#2270400 <https://reviews.llvm.org/D86048#2270400>, @rsmith wrote:

> In D86048#2254607 <https://reviews.llvm.org/D86048#2254607>, @sammccall wrote:
>
>> The crux is we're forcing `decltype(N)` to be a (unique) dependent type, which feels wrong.
>> [...]
>> There are three behaviors:
>>
>> - standard up to C++14: traversing the expr looking for a template param to be lexically included (this is my reading of the standard)
>
> FWIW, "involves a template parameter" is exactly the same phrasing that [temp.over.link] uses to refer to instantiation-dependence; that's why Clang uses instantiation-dependence in this case at the moment.
>
>> - what clang actually does: check instantiation dependence, which I think pulls in too many cases
>> - standard after http://wg21.link/cwg2064: check type dependence
>>
>> I think it's probably OK to adopt the C++17 behavior for all versions (if I'm right that the current behavior is a bug).
>> @rsmith It's your DR, what do you think :-)
>
> Let's try it and see what happens. I think this will reveal a collection of cases where we don't properly handle instantiation-dependent-but-not-type-dependent constructs (such as, if I remember correctly, the types of non-type template parameters), but we should be fixing those bugs anyway :)

https://reviews.llvm.org/D87349 is an attempt.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86048/new/

https://reviews.llvm.org/D86048



More information about the cfe-commits mailing list