[PATCH] D126198: [analyzer][NFCi] Annotate major nonnull returning functions

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 23 05:30:09 PDT 2022


martong accepted this revision.
martong added a comment.
This revision is now accepted and ready to land.

Looks good, with minor revisions.



================
Comment at: clang/include/clang/Analysis/AnalysisDeclContext.h:233
+      : Kind(k), Ctx(ctx), Parent(parent), ID(ID) {
+    assert(Ctx);
+  }
----------------
To be consistent with the other hunks, where you assert on the parameter, not on the member.


================
Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:919
 public:
+  // TODO what does this return?
   virtual const ValueDecl *getDecl() const = 0;
----------------



================
Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:1021
     assert(!cast<StackSpaceRegion>(SReg)->getStackFrame()->inTopFrame());
+    assert(OriginExpr);
   }
----------------



================
Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:1091
+      : DeclRegion(sReg, FieldRegionKind), FD(fd) {
+    assert(FD);
+  }
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126198



More information about the cfe-commits mailing list