File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ template <typename d> class e {
29
29
constexpr static int calc_val () { return 1 + 2 ; }
30
30
const auto the_value = calc_val() + sizeof (char );
31
31
32
+ void vlaTest () {
33
+ int msize = 4 ;
34
+ float arr[msize];
35
+ [&arr] {};
36
+ }
37
+
32
38
// RUN: c-index-test -evaluate-cursor-at=%s:4:7 \
33
39
// RUN: -evaluate-cursor-at=%s:8:7 \
34
40
// RUN: -evaluate-cursor-at=%s:8:11 -std=c++11 %s | FileCheck %s
@@ -65,3 +71,7 @@ const auto the_value = calc_val() + sizeof(char);
65
71
// CHECK-EXPR: Value: 3
66
72
// CHECK-EXPR: unsigned, Value: 4
67
73
// CHECK-EXPR: unsigned, Value: 1
74
+
75
+ // RUN: c-index-test -evaluate-cursor-at=%s:35:5 \
76
+ // RUN: -std=c++11 %s | FileCheck -check-prefix=VLA %s
77
+ // VLA: Not Evaluatable
Original file line number Diff line number Diff line change @@ -3272,7 +3272,7 @@ bool CursorVisitor::RunVisitorWorkList(VisitorWorkList &WL) {
3272
3272
}
3273
3273
// Visit init captures
3274
3274
for (auto InitExpr : E->capture_inits ()) {
3275
- if (Visit (InitExpr))
3275
+ if (InitExpr && Visit (InitExpr))
3276
3276
return true ;
3277
3277
}
3278
3278
You can’t perform that action at this time.
0 commit comments