[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 3 15:16:55 PDT 2017


dcoughlin added a comment.

This looks good! You will need to add tests though. I would suggest adding them to "test/Analysis/retain-release-inline.m"



================
Comment at: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp:1898
+bool
+isAnnotatedToSkipDiagnostics(const LocationContext *LCtx) {
+  while (LCtx) {
----------------
Naming-wise, I think it is probably better to describe the high-level semantics of this function rather than how it is intended to be used. I would suggest something like "isTrustedReferenceCountImplementation" for this function instead.

Also, let's break with tradition and add a doxygen style comment describing what the function does.


Repository:
  rL LLVM

https://reviews.llvm.org/D34937





More information about the cfe-commits mailing list