File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 29
29
bd .getHead ( ) = m .getName ( )
30
30
or
31
31
// Covers the use of defined() to check if a macro is defined
32
- m .getName ( ) = bd .getHead ( ) .regexpCapture ( ".*defined\\((.*) \\).*" , 1 )
32
+ m .getName ( ) = bd .getHead ( ) .regexpCapture ( ".*defined * \\(? *([^\\s()]+) * \\)?\\ .*" , 1 )
33
33
) and
34
34
// We consider a macro "used" if the name is undef-ed at some point in the same file, or a file
35
35
// that includes the file defining the macro. This will over approximate use in the case of a
Original file line number Diff line number Diff line change @@ -42,6 +42,18 @@ void test() {
42
42
#if defined(CHECKED_MACRO_BEFORE_3 )
43
43
#endif
44
44
45
+ #if defined(CHECKED_MACRO_BEFORE_4 )
46
+ #endif
47
+
48
+ #if defined(CHECKED_MACRO_BEFORE_5 )
49
+ #endif
50
+
51
+ #if defined(CHECKED_MACRO_BEFORE_6 )
52
+ #endif
53
+
45
54
#define CHECKED_MACRO_BEFORE_1 // COMPLIANT - used in branch
46
55
#define CHECKED_MACRO_BEFORE_2 // COMPLIANT - used in branch
47
- #define CHECKED_MACRO_BEFORE_3 // COMPLIANT - used in branch
56
+ #define CHECKED_MACRO_BEFORE_3 // COMPLIANT - used in branch
57
+ #define CHECKED_MACRO_BEFORE_4 // COMPLIANT - used in branch
58
+ #define CHECKED_MACRO_BEFORE_5 // COMPLIANT - used in branch
59
+ #define CHECKED_MACRO_BEFORE_6 // COMPLIANT - used in branch
You can’t perform that action at this time.
0 commit comments