[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 13 11:37:36 PDT 2018


aaron.ballman added inline comments.


================
Comment at: lib/Sema/SemaExpr.cpp:14249
+
+    if (Sema::TypeHasNoDeref(Inner))
+      DeclRef = E;
----------------
The sugar was stripped off at the pointer level, but not at the pointee level. e.g.,
```
typedef int (bobble);
typedef bobble * (frobble);
typedef frobble * yobble;

yobble gobble;
```
I think you can handle this within `TypeHasNoDeref()` and that should fix up all the callers.


Repository:
  rC Clang

https://reviews.llvm.org/D49511





More information about the cfe-commits mailing list