leonardchan added a comment.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

I think I found a false negative with this where if the member is accessed from 
a packed struct type returned from a function, the warning does not appear:

  typedef struct {
    uint8_t a;
    uint32_t b; 
  } __attribute__((packed)) registers_t;
  
  registers_t *Class::method() { return registers_; }
  
  void Class::func() {
    other_func(&method()->b);  // I think the warning should appear here?
  }


Repository:
  rL LLVM

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

https://reviews.llvm.org/D20561



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D20561: Warn w... Leonard Chan via Phabricator via cfe-commits

Reply via email to