[PATCH] D49511: [Sema/Attribute] Check for noderef attribute
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 10 12:07:35 PDT 2018
aaron.ballman added inline comments.
================
Comment at: lib/Sema/SemaExpr.cpp:14251-14253
+ if (const auto *Ptr = dyn_cast<PointerType>(Ty))
+ Inner = Ptr->getPointeeType();
+ else if (const auto *Arr = dyn_cast<ArrayType>(Ty))
----------------
I don't think this strips off sugar from the type, so I suspect it won't properly handle a typedef to a pointer type, for instance, or a type including parens. You should add tests for these cases.
Repository:
rC Clang
https://reviews.llvm.org/D49511
More information about the cfe-commits
mailing list