File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -57,8 +57,36 @@ void local_variable_qualifiers_specifiers() {
57
57
int tmp;
58
58
tmp = p[5 ];
59
59
tmp = q[5 ];
60
+
61
+ [[deprecated]] const int * x = a;
62
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:18-[[@LINE-1]]:29}:"std::span<int const>"
63
+ const int * y [[deprecated]];
64
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:3-[[@LINE-1]]:14}:"std::span<int const>"
65
+ tmp = x[5 ];
66
+ tmp = y[5 ];
60
67
}
61
68
69
+ void local_variable_unsupported_specifiers () {
70
+ int a[10 ];
71
+ const int * p [[deprecated]] = a; // not supported because the attribute overlaps the source range of the declaration
72
+ // CHECK-NOT: fix-it:"{{.*}}":{[[@LINE-1]]:
73
+
74
+ static const int * q = a; // storage specifier not supported yet
75
+ // CHECK-NOT: fix-it:"{{.*}}":{[[@LINE-1]]:
76
+
77
+ extern int * x; // storage specifier not supported yet
78
+ // CHECK-NOT: fix-it:"{{.*}}":{[[@LINE-1]]:
79
+
80
+ constexpr int * y = 0 ; // `constexpr` specifier not supported yet
81
+ // CHECK-NOT: fix-it:"{{.*}}":{[[@LINE-1]]:
82
+
83
+ int tmp;
84
+
85
+ tmp = p[5 ];
86
+ tmp = q[5 ];
87
+ tmp = x[5 ];
88
+ tmp = y[5 ];
89
+ }
62
90
63
91
void local_array_subscript_variable_extent () {
64
92
int n = 10 ;
You can’t perform that action at this time.
0 commit comments