[PATCH] D16044: getVariableName() for MemRegion

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 11 03:23:06 PST 2016


xazax.hun added inline comments.

================
Comment at: tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp:643
@@ +642,3 @@
+  const clang::ento::MemRegion *R = this;
+  llvm::SmallString<200> buf;
+  llvm::raw_svector_ostream os(buf);
----------------
Do you think 200 is a reasonable size here? In case the namespaces are not included in the printed name, I think it is very rare that a name would be longer than 100 characters.

================
Comment at: tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp:658
@@ +657,3 @@
+
+    R = R->getAs<clang::ento::ElementRegion>()->getSuperRegion();
+  }
----------------
Can you use ER here instead of additional getAs?


http://reviews.llvm.org/D16044





More information about the cfe-commits mailing list