From: Anna Zaks Date: Sat, 20 Apr 2013 01:15:36 +0000 (+0000) Subject: [analyzer] Flip printPretty and printPrettyAsExpr as per suggestion from Jordan ... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=716859df842e5a56e816d820d8326ead152dd9e4;p=clang [analyzer] Flip printPretty and printPrettyAsExpr as per suggestion from Jordan (r179572) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179915 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h b/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h index f8f9e6db4d..e4d67cab0d 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h @@ -884,7 +884,7 @@ public: return R->getKind() == VarRegionKind; } - bool canPrintPretty() const; + bool canPrintPrettyAsExpr() const; void printPrettyAsExpr(raw_ostream &os) const; }; @@ -965,7 +965,7 @@ public: const ObjCIvarDecl *getDecl() const; QualType getValueType() const; - bool canPrintPretty() const; + bool canPrintPrettyAsExpr() const; void printPrettyAsExpr(raw_ostream &os) const; void dumpToStream(raw_ostream &os) const; diff --git a/lib/StaticAnalyzer/Core/MemRegion.cpp b/lib/StaticAnalyzer/Core/MemRegion.cpp index 8f9f8c6dcd..cad42044b9 100644 --- a/lib/StaticAnalyzer/Core/MemRegion.cpp +++ b/lib/StaticAnalyzer/Core/MemRegion.cpp @@ -555,11 +555,11 @@ void StackLocalsSpaceRegion::dumpToStream(raw_ostream &os) const { } bool MemRegion::canPrintPretty() const { - return false; + return canPrintPrettyAsExpr(); } bool MemRegion::canPrintPrettyAsExpr() const { - return canPrintPretty(); + return false; } void MemRegion::printPretty(raw_ostream &os) const { @@ -575,7 +575,7 @@ void MemRegion::printPrettyAsExpr(raw_ostream &os) const { return; } -bool VarRegion::canPrintPretty() const { +bool VarRegion::canPrintPrettyAsExpr() const { return true; } @@ -583,7 +583,7 @@ void VarRegion::printPrettyAsExpr(raw_ostream &os) const { os << getDecl()->getName(); } -bool ObjCIvarRegion::canPrintPretty() const { +bool ObjCIvarRegion::canPrintPrettyAsExpr() const { return true; }