[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute
Devin Coughlin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 17 18:27:57 PDT 2017
dcoughlin added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp:3412
+ if (FD->getDefinition()) {
+ canEval = hasRCAnnotation(FD->getDefinition(),
+ "rc_ownership_trusted_implementation");
----------------
I'd like you to keep a call to "isTrustedReferenceCountImplementation()". The name of the function indicates what it means (rather than how it does it), which will be important when/if we change how annotations are implemented (for example, away from using the 'annotation' attribute to a custom attribute).
Using common code to check for annotations makes a lot sense though -- can you call hasRCAnnotation() from inside isTrustedReferenceCountImplementation()?
Repository:
rL LLVM
https://reviews.llvm.org/D34937
More information about the cfe-commits
mailing list