diff options
author | Ted Kremenek <kremenek@apple.com> | 2013-02-26 19:44:38 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2013-02-26 19:44:38 +0000 |
commit | 4238f41d484729aca260140fbbc53a68769bf60a (patch) | |
tree | b985488d66c1d4f0305a3d2bde872977fb7e2b5e /lib/StaticAnalyzer | |
parent | 9016bb771265a10f188c76342254badecc695253 (diff) |
[analyzer] Use 'MemRegion::printPretty()' instead of assuming the region is a VarRegion.
Fixes PR15358 and <rdar://problem/13295437>.
Along the way, shorten path diagnostics that say "Variable 'x'" to just
be "'x'". By the context, it is obvious that we have a variable,
and so this just consumes text space.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176115 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer')
-rw-r--r-- | lib/StaticAnalyzer/Core/BugReporterVisitors.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp index 82d3e5e28f..be7a401e3a 100644 --- a/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ b/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -462,7 +462,9 @@ PathDiagnosticPiece *FindLastStoreBRVisitor::VisitNode(const ExplodedNode *Succ, if (!R) return 0; - os << "Variable '" << *VR->getDecl() << "' "; + os << '\''; + R->printPretty(os); + os << "' "; if (V.getAs<loc::ConcreteInt>()) { bool b = false; |