aaron.ballman added inline comments.

================
Comment at: clang/lib/AST/ASTContext.cpp:10290
+    // information.
+    if (const auto *AT = LHS->getAs<AutoType>()) {
+      if (AT->getKeyword() == AutoTypeKeyword::GNUAutoType)
----------------
erichkeane wrote:
> So do we care if BOTH sides are this auto type?  Further question: can there 
> be more than 1 of these 'GNUAutoType's in the type system such that 10211 
> wouldn't fire? 
> 
> Also, slight preference for AutoType having 'isGNUAutoTYpe' on it instead of 
> this dance everywhere.
> 
> Speaking of which: that also makes me concerned about all the places in our 
> code that assume `!isDeclTypeAuto` means C++ auto....  But that is perhaps 
> for a future bug reporter to discover.
> So do we care if BOTH sides are this auto type? 

This only fires when the type classes don't match, see 10272.

> Further question: can there be more than 1 of these 'GNUAutoType's in the 
> type system such that 10211 wouldn't fire?

Yes, but we wouldn't hit this block of code in that case because the type 
classes would match.

> Also, slight preference for AutoType having 'isGNUAutoTYpe' on it instead of 
> this dance everywhere.

I was on the fence about that, and this gets me off the fence.

> Speaking of which: that also makes me concerned about all the places in our 
> code that assume !isDeclTypeAuto means C++ auto.... But that is perhaps for a 
> future bug reporter to discover.

+1


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

https://reviews.llvm.org/D122029

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to