[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 09:27:49 PDT 2017


dcoughlin added a comment.

Looks good to me, other than a nit on indentation and a request for a little bit more info in a comment!



================
Comment at: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp:3394
+  // See if the function has 'rc_ownership_trusted_implementation'
+  // annotate attribute.
+  bool hasTrustedImplementationAnnotation = false;
----------------
Can you add a little bit more comment here to describe what the checker will do if the function has the attribute? Some like "... if so, we won't inline it."


================
Comment at: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp:3412
+    } else {
+        if (FD->getDefinition()) {
+          canEval = isTrustedReferenceCountImplementation(FD->getDefinition());
----------------
Nit: indentation is off here. It should be two spaces.


Repository:
  rL LLVM

https://reviews.llvm.org/D34937





More information about the cfe-commits mailing list