[clang] [analyzer] Explicitly register NoStoreFuncVisitor from alpha.unix.cst… (PR #108373)

Kristóf Umann via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 16 04:59:55 PDT 2024


================
@@ -263,6 +263,23 @@ bool SVal::isZeroConstant() const {
 // Pretty-Printing.
 //===----------------------------------------------------------------------===//
 
+StringRef SVal::getKindStr() const {
+  switch (getKind()) {
+#define BASIC_SVAL(Id, Parent)                                                 \
+  case Id##Kind:                                                               \
+    return #Id;
+#define LOC_SVAL(Id, Parent)                                                   \
+  case Loc##Id##Kind:                                                          \
+    return #Id;
+#define NONLOC_SVAL(Id, Parent)                                                \
+  case NonLoc##Id##Kind:                                                       \
+    return #Id;
+#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.def"
+#undef REGION
+  }
+  llvm_unreachable("Unkown kind!");
+}
----------------
Szelethus wrote:

Yep. I recall back in the day that I asked authors to separate this into smaller patches, but yeah, I've grown old and lazy. I think this is tolerable :)

https://github.com/llvm/llvm-project/pull/108373


More information about the cfe-commits mailing list