[PATCH] D113622: [wip] [analyzer] support ignoring use-after-free checking with reference_counted attribute

Chris D'Angelo via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 1 12:07:41 PST 2021


chrisdangelo added inline comments.


================
Comment at: clang/include/clang/Basic/Attr.td:1735
+  let Spellings = [Clang<"reference_counted">];
+  let Subjects = SubjectList<[Record]>;
+  let Documentation = [Undocumented];
----------------
I've discussed a bit with Devin Coughlin yesterday. Devin would like to be sure that we have appropriate warnings showing if this attribute is misused.

Previously, when I have been testing the use of this attribute, I mistakenly added the attribute annotation after "typedef" and before "struct". This was causing the attribute to not be discovered when the analyzer attempts to inspect the declaration. I don't recall if a compiler warning was being emitted.

This note is being written as a reminder to be evaluate what warning support is already included or adding support if necessary.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113622



More information about the cfe-commits mailing list