From 868bebf844be3cd49bfa01f6ea63bf4106a6bb37 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 2 Jul 2013 09:38:48 +0000 Subject: Teach static analyzer about AttributedStmts Summary: Static analyzer used to abort when encountering AttributedStmts, because it asserted that the statements should not appear in the CFG. This is however not the case, since at least the clang::fallthrough annotation makes it through. This commit simply makes the analyzer ignore the statement attributes. CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1030 llvm-svn: 185417 --- clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngine.cpp') diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index db32003e7bf..59c66b83c73 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -652,7 +652,6 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, case Stmt::IfStmtClass: case Stmt::IndirectGotoStmtClass: case Stmt::LabelStmtClass: - case Stmt::AttributedStmtClass: case Stmt::NoStmtClass: case Stmt::NullStmtClass: case Stmt::SwitchStmtClass: @@ -709,6 +708,7 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, // Cases we intentionally don't evaluate, since they don't need // to be explicitly evaluated. case Stmt::AddrLabelExprClass: + case Stmt::AttributedStmtClass: case Stmt::IntegerLiteralClass: case Stmt::CharacterLiteralClass: case Stmt::ImplicitValueInitExprClass: -- cgit v1.2.3