[PATCH] D122029: Change __auto_type behavior with qualifiers to match GCC behavior
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 18 13:09:28 PDT 2022
erichkeane added a comment.
Just a couple of questions/concerns! Otherwise it LGTM. Since I have a suggestion for a code change, I'll hold off on approval until you do it or give a reasonable reason why not.
================
Comment at: clang/lib/AST/ASTContext.cpp:10290
+ // information.
+ if (const auto *AT = LHS->getAs<AutoType>()) {
+ if (AT->getKeyword() == AutoTypeKeyword::GNUAutoType)
----------------
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122029/new/
https://reviews.llvm.org/D122029
More information about the cfe-commits
mailing list