File tree Expand file tree Collapse file tree 4 files changed +14
-8
lines changed Expand file tree Collapse file tree 4 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 1+ - ` A3-3-1 ` - ` ExternalLinkageNotDeclaredInHeaderFile.ql ` :
2+ - Adjust the alert message to comply with the style guide.
Original file line number Diff line number Diff line change 3838 // Main functions are an exception to the rule
3939 not de .getDeclaration ( ) instanceof MainFunction and
4040 if de .getDeclaration ( ) instanceof Function then kind = "function" else kind = "object"
41- select de , "Externally linked " + kind + " " + de .getName ( ) + " not declared in header file."
41+ select de , "Externally linked " + kind + " ' " + de .getName ( ) + "' not declared in header file."
Original file line number Diff line number Diff line change 1- | test.cpp:3:5:3:6 | definition of g1 | Externally linked object g1 not declared in header file. |
2- | test.cpp:4:12:4:13 | declaration of g2 | Externally linked object g2 not declared in header file. |
3- | test.cpp:10:5:10:6 | definition of l1 | Externally linked object l1 not declared in header file. |
4- | test.cpp:11:6:11:7 | definition of f1 | Externally linked function f1 not declared in header file. |
5- | test.cpp:22:5:22:5 | definition of f | Externally linked function f not declared in header file. |
6- | test.cpp:25:5:25:6 | declaration of f1 | Externally linked function f1 not declared in header file. |
1+ | test.cpp:3:5:3:6 | definition of g1 | Externally linked object 'g1' not declared in header file. |
2+ | test.cpp:4:12:4:13 | declaration of g2 | Externally linked object 'g2' not declared in header file. |
3+ | test.cpp:10:5:10:6 | definition of l1 | Externally linked object 'l1' not declared in header file. |
4+ | test.cpp:11:6:11:7 | definition of f1 | Externally linked function 'f1' not declared in header file. |
5+ | test.cpp:22:5:22:5 | definition of f | Externally linked function 'f' not declared in header file. |
6+ | test.cpp:25:5:25:6 | declaration of f1 | Externally linked function 'f1' not declared in header file. |
Original file line number Diff line number Diff line change @@ -35,4 +35,8 @@ namespace n {
3535void f5 () { // COMPLIANT
3636 int i = 0 ;
3737}
38- } // namespace n
38+ } // namespace n
39+
40+ const int c = 1 ; // COMPLIANT - internal linkage
41+ const char *const str2 = " foo" ; // COMPLIANT - internal linkage
42+ constexpr int k = 1 ; // COMPLIANT - internal linkage
You can’t perform that action at this time.
0 commit comments