diff options
Diffstat (limited to 'clang/lib/CodeGen/CoverageMappingGen.cpp')
-rw-r--r-- | clang/lib/CodeGen/CoverageMappingGen.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp index f091577..73811d1 100644 --- a/clang/lib/CodeGen/CoverageMappingGen.cpp +++ b/clang/lib/CodeGen/CoverageMappingGen.cpp @@ -1505,6 +1505,14 @@ struct CounterCoverageMappingBuilder handleFileExit(getEnd(S)); } + void VisitStmtExpr(const StmtExpr *E) { + Visit(E->getSubStmt()); + // Any region termination (such as a noreturn CallExpr) within the statement + // expression has been handled by visiting the sub-statement. The visitor + // cannot be at a terminate statement leaving the statement expression. + HasTerminateStmt = false; + } + void VisitDecl(const Decl *D) { Stmt *Body = D->getBody(); |