Re: [PATCH] D16934: [Coverage] Fix crash in VisitIfStmt

2016-02-08 Thread Vedant Kumar via cfe-commits
vsk updated this revision to Diff 47230. vsk added a comment. - Check that we don't crash on a nested 'STMT' test case. http://reviews.llvm.org/D16934 Files: lib/CodeGen/CoverageMappingGen.cpp test/CoverageMapping/macro-expressions.cpp Index: test/CoverageMapping/macro-expressions.cpp

Re: [PATCH] D16934: [Coverage] Fix crash in VisitIfStmt

2016-02-08 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL260129: [Coverage] Fix crash when handling certain macro expansions (authored by vedantk). Changed prior to commit: http://reviews.llvm.org/D16934?vs=47230&id=47232#toc Repository: rL LLVM http://re

Re: [PATCH] D16934: [Coverage] Fix crash in VisitIfStmt

2016-02-08 Thread Vedant Kumar via cfe-commits
vsk updated this revision to Diff 47229. vsk added a comment. - Made the check a bit more general by moving it to `propagateCounts`. - Added 3 more tests. http://reviews.llvm.org/D16934 Files: lib/CodeGen/CoverageMappingGen.cpp test/CoverageMapping/macro-expressions.cpp Index: test/Coverag

Re: [PATCH] D16934: [Coverage] Fix crash in VisitIfStmt

2016-02-08 Thread Justin Bogner via cfe-commits
Vedant Kumar writes: > vsk created this revision. > vsk added a reviewer: bogner. > vsk added a subscriber: cfe-commits. > > When handling 'if' statements, we crash if the condition and the consequent > branch are spanned by a single macro expansion. > > The crash occurs because of a sanity 'reset

[PATCH] D16934: [Coverage] Fix crash in VisitIfStmt

2016-02-05 Thread Vedant Kumar via cfe-commits
vsk created this revision. vsk added a reviewer: bogner. vsk added a subscriber: cfe-commits. When handling 'if' statements, we crash if the condition and the consequent branch are spanned by a single macro expansion. The crash occurs because of a sanity 'reset' in `popRegions()`: if an expansion