[PATCH] D38764: [Analyzer] Assume const string-like globals are non-null

George Karpenkov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 11 11:38:02 PDT 2017


george.karpenkov marked 9 inline comments as done.
george.karpenkov added inline comments.


================
Comment at: lib/StaticAnalyzer/Checkers/NonnullStringConstantsChecker.cpp:22
+//  Checker uses are defined in the test file:
+//   - test/Analysis/nonnull-string-constants.mm
+//
----------------
dcoughlin wrote:
> We generally don't do this kind of cross-reference in comments since they tend to get stale fast when things get moved around. There is no tool support to keep them in sync.
:(
I guess I'm too spoiled by Javadoc.


================
Comment at: lib/StaticAnalyzer/Checkers/NonnullStringConstantsChecker.cpp:53
+private:
+  /// Lazily initialize cache for required identifier informations.
+  void initIdentifierInfo(ASTContext &Ctx) const;
----------------
dcoughlin wrote:
> We usually put the oxygen comments on checkers on the implementation and not the interface since they aren't API and people reading the code generally look at the implementations. Can you move them to the implementations?
OK. I assume there's no good universal solution here.


https://reviews.llvm.org/D38764





More information about the cfe-commits mailing list