summaryrefslogtreecommitdiff
path: root/test/CoverageMapping/if.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Coverage] Emit gap areas in braces-optional statements (PR35387)Vedant Kumar2017-11-291-0/+7
| | | | | | | | | | | | | Emit a gap area starting after the r-paren location and ending at the start of the body for the braces-optional statements (for, for-each, while, etc). The count for the gap area equal to the body's count. This extends the fix in r317758. Fixes PR35387, rdar://35570345 Testing: stage2 coverage-enabled build of clang, check-clang git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319373 91177308-0d34-0410-b5e6-96231b3b80d8
* [Coverage] Emit a gap area after if conditionsVedant Kumar2017-11-091-12/+18
| | | | | | | | | | | | | | | | | | | The area immediately after the closing right-paren of an if condition should have a count equal to the 'then' block's count. Use a gap region to set this count, so that region highlighting for the 'then' block remains precise. This solves a problem we have with wrapped segments. Consider: 1| if (false) 2| foo(); Without a gap area starting after the condition, the wrapped segment from line 1 would make it look like line 2 is executed, when it's not. rdar://35373009 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317758 91177308-0d34-0410-b5e6-96231b3b80d8
* [Coverage] Support for C++17 if initializersVedant Kumar2016-10-141-0/+39
Differential Revision: https://reviews.llvm.org/D25572 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284293 91177308-0d34-0410-b5e6-96231b3b80d8