[PATCH] D92141: Fix noderef for AddrOf on MemberExpr

Jann Horn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 25 16:45:22 PST 2020


thejh marked an inline comment as done.
thejh added inline comments.


================
Comment at: clang/test/Frontend/noderef.c:75-76
+  // enclosing AddrOf.
+  p = &s->a;    // ok
+  p = &(*s).a;  // ok
+  p2 = &s->a;   // expected-warning{{casting to dereferenceable pointer removes 'noderef' attribute}}
----------------
leonardchan wrote:
> These two can probably be removed since we have
> 
> ```
>   p = &s->a;
>   p = &(*s).b;
> ```
> 
> above. 
Good point, I've removed them now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92141



More information about the cfe-commits mailing list