diff options
Diffstat (limited to 'lib/Analysis')
| -rw-r--r-- | lib/Analysis/CFG.cpp | 9 | ||||
| -rw-r--r-- | lib/Analysis/CMakeLists.txt | 2 | 
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp index d1334a543191..2f1f1cb4e4da 100644 --- a/lib/Analysis/CFG.cpp +++ b/lib/Analysis/CFG.cpp @@ -18,6 +18,7 @@  #include "clang/AST/StmtVisitor.h"  #include "clang/AST/PrettyPrinter.h"  #include "clang/AST/CharUnits.h" +#include "clang/Basic/AttrKinds.h"  #include "llvm/Support/GraphWriter.h"  #include "llvm/Support/Allocator.h"  #include "llvm/Support/Format.h" @@ -1069,6 +1070,9 @@ CFGBlock *CFGBuilder::Visit(Stmt * S, AddStmtChoice asc) {      case Stmt::LambdaExprClass:        return VisitLambdaExpr(cast<LambdaExpr>(S), asc); +    case Stmt::AttributedStmtClass: +      return Visit(cast<AttributedStmt>(S)->getSubStmt(), asc); +      case Stmt::MemberExprClass:        return VisitMemberExpr(cast<MemberExpr>(S), asc); @@ -1131,7 +1135,7 @@ CFGBlock *CFGBuilder::VisitStmt(Stmt *S, AddStmtChoice asc) {  /// VisitChildren - Visit the children of a Stmt.  CFGBlock *CFGBuilder::VisitChildren(Stmt *Terminator) { -  CFGBlock *lastBlock = Block;   +  CFGBlock *lastBlock = Block;    for (Stmt::child_range I = Terminator->children(); I; ++I)      if (Stmt *child = *I)        if (CFGBlock *b = Visit(child)) @@ -1280,7 +1284,8 @@ static bool CanThrow(Expr *E, ASTContext &Ctx) {    const FunctionType *FT = Ty->getAs<FunctionType>();    if (FT) {      if (const FunctionProtoType *Proto = dyn_cast<FunctionProtoType>(FT)) -      if (Proto->isNothrow(Ctx)) +      if (Proto->getExceptionSpecType() != EST_Uninstantiated && +          Proto->isNothrow(Ctx))          return false;    }    return true; diff --git a/lib/Analysis/CMakeLists.txt b/lib/Analysis/CMakeLists.txt index 43c3ffbaf1ea..ca2392b91588 100644 --- a/lib/Analysis/CMakeLists.txt +++ b/lib/Analysis/CMakeLists.txt @@ -1,4 +1,4 @@ -set(LLVM_USED_LIBS clangBasic clangAST clangIndex) +set(LLVM_USED_LIBS clangBasic clangAST)  add_clang_library(clangAnalysis    AnalysisDeclContext.cpp  | 
