Skip to content

Commit 877ee70

Browse files
authored
Merge pull request github#13884 from jketema/global-var-declspec
C++: Add test for `__declspec` attribute on a global variable
2 parents e011480 + d80eff3 commit 877ee70

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

cpp/ql/test/library-tests/attributes/var_attributes/ms_var_attributes.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ class AddressOfGetter {
1616
&field;
1717
}
1818
};
19+
20+
__declspec("SAL_volatile") char* pBuf;

cpp/ql/test/library-tests/attributes/var_attributes/var_attributes.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
| ms_var_attributes.cpp:8:15:8:20 | myInt4 | ms_var_attributes.cpp:8:1:8:9 | dllexport |
55
| ms_var_attributes.cpp:9:5:9:10 | myInt5 | ms_var_attributes.h:7:1:7:9 | dllexport |
66
| ms_var_attributes.cpp:12:42:12:46 | field | ms_var_attributes.cpp:12:14:12:21 | property |
7+
| ms_var_attributes.cpp:20:34:20:37 | pBuf | ms_var_attributes.cpp:20:12:20:12 | SAL_volatile |
78
| ms_var_attributes.h:5:22:5:27 | myInt3 | ms_var_attributes.h:5:1:5:9 | dllexport |
89
| var_attributes.c:1:12:1:19 | weak_var | var_attributes.c:1:36:1:39 | weak |
910
| var_attributes.c:2:12:2:22 | weakref_var | var_attributes.c:2:39:2:45 | weakref |

0 commit comments

Comments
 (0)