Skip to content

Commit 124ea86

Browse files
committed
C++: add test for attributes on fields
1 parent 2b0ad2d commit 124ea86

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
struct S1 {
2+
[[deprecated]] int a;
3+
int b;
4+
};
5+
6+
struct S2 {
7+
int x;
8+
[[deprecated, gnu::unused]] int b;
9+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
| field_attributes.cpp:2:22:2:22 | a | field_attributes.cpp:2:5:2:14 | deprecated |
2+
| field_attributes.cpp:8:35:8:35 | b | field_attributes.cpp:8:5:8:14 | deprecated |
3+
| field_attributes.cpp:8:35:8:35 | b | field_attributes.cpp:8:17:8:27 | unused |
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import cpp
2+
3+
select any(Variable v) as v, v.getAnAttribute()

0 commit comments

Comments
 (0)