]> granicus.if.org Git - clang/commitdiff
[analyzer] Nitpicks on Olaf's patch, which I meant to e-mail but then didn't in
authorJordy Rose <jediknil@belkadan.com>
Fri, 12 Aug 2011 21:41:07 +0000 (21:41 +0000)
committerJordy Rose <jediknil@belkadan.com>
Fri, 12 Aug 2011 21:41:07 +0000 (21:41 +0000)
time. One is cleanup, the other is me being OCD about enum group nesting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137517 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
lib/StaticAnalyzer/Checkers/CStringChecker.cpp

index 3c1fdb6be0fe33b50f2abeacd622030a88cce38e..973a1ee41ab81e26c5fca6e06c24e8deb7e83041 100644 (file)
@@ -100,8 +100,8 @@ public:
     END_DECL_REGIONS = ObjCIvarRegionKind,
     CXXTempObjectRegionKind,
     CXXBaseObjectRegionKind,
-    END_TYPED_REGIONS = CXXBaseObjectRegionKind,
-    END_TYPED_VALUE_REGIONS = CXXBaseObjectRegionKind
+    END_TYPED_VALUE_REGIONS = CXXBaseObjectRegionKind,
+    END_TYPED_REGIONS = CXXBaseObjectRegionKind
   };
     
 private:
index 71c4ee68ef25a0d99e964c6b29bf45a132e58f22..4b1a483309923b4959dd55d5d72de373e19ca699 100644 (file)
@@ -769,12 +769,11 @@ const GRState *CStringChecker::InvalidateBuffer(CheckerContext &C,
 
 bool CStringChecker::SummarizeRegion(raw_ostream& os, ASTContext& Ctx,
                                      const MemRegion *MR) {
-  const TypedRegion *TR = dyn_cast<TypedRegion>(MR);
   const TypedValueRegion *TVR = dyn_cast<TypedValueRegion>(MR);
 
-  switch (TR->getKind()) {
+  switch (MR->getKind()) {
   case MemRegion::FunctionTextRegionKind: {
-    const FunctionDecl *FD = cast<FunctionTextRegion>(TR)->getDecl();
+    const FunctionDecl *FD = cast<FunctionTextRegion>(MR)->getDecl();
     if (FD)
       os << "the address of the function '" << FD << "'";
     else