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() {
5757 int tmp;
5858 tmp = p[5 ];
5959 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 ];
6067}
6168
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+ }
6290
6391void local_array_subscript_variable_extent () {
6492 int n = 10 ;
You can’t perform that action at this time.
0 commit comments