[PATCH] D49511: [Sema/Attribute] Check for noderef attribute
Erik Pilkington via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 19 13:20:09 PDT 2018
erik.pilkington added a reviewer: aaron.ballman.
erik.pilkington added a comment.
Thanks for working on this! CCing Aaron, who is code owner for attributes.
================
Comment at: include/clang/Basic/AttrDocs.td:3355
+ let Content = [{
+The ``noderef`` attribute allows for showing a warning whenever a pointer marked with
+this attribute is dereferenced. This is ideally used with pointers that point to special
----------------
'allows for showing' sounds a bit strange... maybe: "The ``noderef`` attribute causes clang to diagnose dereferences of annotated pointer types" or something?
================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:9372
+def warn_dereference_of_noderef_type : Warning<
+ "dereference of noderef expression">, InGroup<IgnoredAttributes>;
} // end of sema component.
----------------
I think -Wignored-attributes is a group for cases where clang ignores an attribute, you should probably add you own diagnostic group, say -Wdereferenced-noderef or something for this diagnostic. You should add this to DiagnosticGroups.td.
Repository:
rC Clang
https://reviews.llvm.org/D49511
More information about the cfe-commits
mailing list