[PATCH] D77391: [analyzer][AnalysisOrder] Display the CallEvent type for preCall/postCall

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 6 11:57:53 PDT 2020


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

Wonderful tests!



================
Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:202
   virtual Kind getKind() const = 0;
+  virtual StringRef getKindAsString() const = 0;
 
----------------
Maybe make a `static StringRef getKindAsString(Kind);` in the base class and defer to it instead so that they all were in one place near the enum itself?

(i'm not sure it's actually better)


================
Comment at: clang/test/Analysis/Inputs/system-header-simulator-cxx.h:971-972
 #else
-void* operator new(std::size_t, const std::nothrow_t&) throw();
-void* operator new[](std::size_t, const std::nothrow_t&) throw();
-void operator delete(void*, const std::nothrow_t&) throw();
-void operator delete[](void*, const std::nothrow_t&) throw();
+// C++20 standard draft 17.6.1, from "Header <new> synopsis", but with throw()
+// instead of noexcept:
+
----------------
Does it need to be guarded with `#if __cplusplus >= ...` then?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77391





More information about the cfe-commits mailing list