diff options
author | Igor Kudrin <ikudrin.dev@gmail.com> | 2016-04-25 09:43:37 +0000 |
---|---|---|
committer | Igor Kudrin <ikudrin.dev@gmail.com> | 2016-04-25 09:43:37 +0000 |
commit | ed99a96f06d29c7bf3e4a8b5054e6c8fa08410ab (patch) | |
tree | 8d19f7177da2bd6b05d21bd521998557a575bdc2 /llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp | |
parent | 795c629ec93cfa4da558df3231c1309fbe6883be (diff) | |
download | bcm5719-llvm-ed99a96f06d29c7bf3e4a8b5054e6c8fa08410ab.tar.gz bcm5719-llvm-ed99a96f06d29c7bf3e4a8b5054e6c8fa08410ab.zip |
[Coverage] Restore the correct count value after processing a nested region in case of combined regions.
If several regions cover the same area of code, we have to restore
the combined value for that area when return from a nested region.
This patch achieves that by combining regions before calling buildSegments.
Differential Revision: http://reviews.llvm.org/D18610
llvm-svn: 267390
Diffstat (limited to 'llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp')
-rw-r--r-- | llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp b/llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp index a9be473dc91..ad00199712f 100644 --- a/llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp +++ b/llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp @@ -7,10 +7,10 @@ template<typename T> // ALL: | [[@LINE]]|template<typename T> int func(T x) { // ALL-NEXT: 2| [[@LINE]]|int func(T x) { if(x) // ALL-NEXT: 2| [[@LINE]]| if(x) return 0; // ALL-NEXT: 1| [[@LINE]]| return 0; - else // ALL-NEXT: 1| [[@LINE]]| else + else // ALL-NEXT: 2| [[@LINE]]| else return 1; // ALL-NEXT: 1| [[@LINE]]| return 1; int j = 1; // ALL-NEXT: 0| [[@LINE]]| int j = 1; -} // ALL-NEXT: 1| [[@LINE]]|} +} // ALL-NEXT: 2| [[@LINE]]|} // CHECK: {{^ *(\| )?}}_Z4funcIbEiT_: // CHECK-NEXT: 1| [[@LINE-9]]|int func(T x) { |