mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
C++: add test for attributes on fields
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
struct S1 {
|
||||
[[deprecated]] int a;
|
||||
int b;
|
||||
};
|
||||
|
||||
struct S2 {
|
||||
int x;
|
||||
[[deprecated, gnu::unused]] int b;
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
| field_attributes.cpp:2:22:2:22 | a | field_attributes.cpp:2:5:2:14 | deprecated |
|
||||
| field_attributes.cpp:8:35:8:35 | b | field_attributes.cpp:8:5:8:14 | deprecated |
|
||||
| field_attributes.cpp:8:35:8:35 | b | field_attributes.cpp:8:17:8:27 | unused |
|
||||
@@ -0,0 +1,3 @@
|
||||
import cpp
|
||||
|
||||
select any(Variable v) as v, v.getAnAttribute()
|
||||
Reference in New Issue
Block a user