From: Jordy Rose Date: Fri, 12 Aug 2011 21:41:07 +0000 (+0000) Subject: [analyzer] Nitpicks on Olaf's patch, which I meant to e-mail but then didn't in X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=096aef9597b263b4cd6a0feaacf9e7214fa9c75a;p=clang [analyzer] Nitpicks on Olaf's patch, which I meant to e-mail but then didn't in 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 --- diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h b/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h index 3c1fdb6be0..973a1ee41a 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h @@ -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: diff --git a/lib/StaticAnalyzer/Checkers/CStringChecker.cpp b/lib/StaticAnalyzer/Checkers/CStringChecker.cpp index 71c4ee68ef..4b1a483309 100644 --- a/lib/StaticAnalyzer/Checkers/CStringChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/CStringChecker.cpp @@ -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(MR); const TypedValueRegion *TVR = dyn_cast(MR); - switch (TR->getKind()) { + switch (MR->getKind()) { case MemRegion::FunctionTextRegionKind: { - const FunctionDecl *FD = cast(TR)->getDecl(); + const FunctionDecl *FD = cast(MR)->getDecl(); if (FD) os << "the address of the function '" << FD << "'"; else