1 // RUN: %clang -g -std=c++11 -S -emit-llvm %s -o - | FileCheck %s
2 // PR19864
main()3 int main() {
4 int v[] = {13, 21, 8, 3, 34, 1, 5, 2};
5 int a = 0, b = 0;
6 for (int x : v)
7 if (x >= 3)
8 ++b; // CHECK: add nsw{{.*}}, 1
9 else if (x >= 0)
10 ++a; // CHECK: add nsw{{.*}}, 1
11 // The continuation block if the if statement should not share the
12 // location of the ++a statement. Having it point to the end of
13 // the condition is not ideal either, but it's less missleading.
14
15 // CHECK: br label
16 // CHECK: br label
17 // CHECK: br label {{.*}}, !dbg ![[DBG:.*]]
18 // CHECK: ![[DBG]] = metadata !{i32 [[@LINE-11]], i32 0, metadata !{{.*}}, null}
19
20 }
21