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 2929 bd .getHead ( ) = m .getName ( )
3030 or
3131 // 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 )
3333 ) and
3434 // We consider a macro "used" if the name is undef-ed at some point in the same file, or a file
3535 // 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() {
4242#if defined(CHECKED_MACRO_BEFORE_3 )
4343#endif
4444
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+
4554#define CHECKED_MACRO_BEFORE_1 // COMPLIANT - used in branch
4655#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