]> granicus.if.org Git - clang/commitdiff
Add pretty-printing for AnonTypedRegion.
authorTed Kremenek <kremenek@apple.com>
Wed, 17 Dec 2008 19:25:50 +0000 (19:25 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 17 Dec 2008 19:25:50 +0000 (19:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61146 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathSensitive/MemRegion.h
lib/Analysis/MemRegion.cpp

index 839b427c054f8af89dd2fecdd9c51e545dd62312..efe0b9a19c13d6e2458acfedc10b2ccf38e4daf4 100644 (file)
@@ -221,6 +221,8 @@ class AnonTypedRegion : public TypedRegion {
 
 public:
 
+  void print(llvm::raw_ostream& os) const;
+  
   QualType getRValueType(ASTContext&) const {
     return T;
   }
index 898aff031f2a2ce2cc207355a91a505ee6c015a6..eafeee66d546359a3269e4ba7e6286585a3d38f3 100644 (file)
@@ -135,6 +135,12 @@ void AllocaRegion::print(llvm::raw_ostream& os) const {
   os << "alloca{" << (void*) Ex << ',' << Cnt << '}';
 }
 
+void AnonTypedRegion::print(llvm::raw_ostream& os) const {
+  os << "anon_type{" << T.getAsString() << ',';
+  getSuperRegion()->print(os);
+  os << '}';
+}
+
 void VarRegion::print(llvm::raw_ostream& os) const {
   os << cast<VarDecl>(D)->getNameAsString();
 }