diff options
Diffstat (limited to 'clang/lib/Analysis/CFG.cpp')
| -rw-r--r-- | clang/lib/Analysis/CFG.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp index 674c01201d2..e06e6617508 100644 --- a/clang/lib/Analysis/CFG.cpp +++ b/clang/lib/Analysis/CFG.cpp @@ -1639,19 +1639,11 @@ CFGBlock *CFGBuilder::VisitDeclStmt(DeclStmt *DS) { /// DeclStmts and initializers in them. CFGBlock *CFGBuilder::VisitDeclSubExpr(DeclStmt *DS) { assert(DS->isSingleDecl() && "Can handle single declarations only."); - Decl *D = DS->getSingleDecl(); - - if (isa<StaticAssertDecl>(D)) { - // static_asserts aren't added to the CFG because they do not impact - // runtime semantics. - return Block; - } - VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl()); if (!VD) { - autoCreateBlock(); - appendStmt(Block, DS); + // Of everything that can be declared in a DeclStmt, only VarDecls impact + // runtime semantics. return Block; } |

