summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CoverageMappingGen.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-10-14 23:38:16 +0000
committerVedant Kumar <vsk@apple.com>2016-10-14 23:38:16 +0000
commit9d2a16b9b19bb3c63f7cba894fa1043b1487768d (patch)
tree77a1276e0a955cfb0ef55c6daba36525f6b161ce /clang/lib/CodeGen/CoverageMappingGen.cpp
parentf2a6ec55215dbbbadcc78a0e091c1cfda611cdef (diff)
downloadbcm5719-llvm-9d2a16b9b19bb3c63f7cba894fa1043b1487768d.tar.gz
bcm5719-llvm-9d2a16b9b19bb3c63f7cba894fa1043b1487768d.zip
[Coverage] Support for C++17 if initializers
Differential Revision: https://reviews.llvm.org/D25572 llvm-svn: 284293
Diffstat (limited to 'clang/lib/CodeGen/CoverageMappingGen.cpp')
-rw-r--r--clang/lib/CodeGen/CoverageMappingGen.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp
index 403fbceefc3..530ac836112 100644
--- a/clang/lib/CodeGen/CoverageMappingGen.cpp
+++ b/clang/lib/CodeGen/CoverageMappingGen.cpp
@@ -875,6 +875,9 @@ struct CounterCoverageMappingBuilder
void VisitIfStmt(const IfStmt *S) {
extendRegion(S);
+ if (S->getInit())
+ Visit(S->getInit());
+
// Extend into the condition before we propagate through it below - this is
// needed to handle macros that generate the "if" but not the condition.
extendRegion(S->getCond());
OpenPOWER on IntegriCloud