================ @@ -171,6 +174,17 @@ class MemRegion : public llvm::FoldingSetNode { Kind getKind() const { return kind; } + StringRef getKindStr() const { + switch (getKind()) { +#define REGION(Id, Parent) \ + case Id##Kind: \ + return #Id; +#include "clang/StaticAnalyzer/Core/PathSensitive/Regions.def" +#undef REGION + } + llvm_unreachable("Unkown kind!"); ---------------- steakhal wrote:
Do we need this? To me the switch is complete, and if it wasn't, we would get a switch warning here anyways. https://github.com/llvm/llvm-project/pull/95408 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits