forked from github/codeql-coding-standards
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunctionLikeMacroParameterNotEnclosedInParentheses.ql
More file actions
26 lines (24 loc) · 1.14 KB
/
FunctionLikeMacroParameterNotEnclosedInParentheses.ql
File metadata and controls
26 lines (24 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
* @id cpp/autosar/function-like-macro-parameter-not-enclosed-in-parentheses
* @name M16-0-6: In the definition of a function-like macro, each instance of a parameter shall be enclosed in parentheses
* @description In the definition of a function-like macro, each instance of a parameter shall be
* enclosed in parentheses, otherwise the result of preprocessor macro substitition may
* not be as expected.
* @kind problem
* @precision very-high
* @problem.severity warning
* @tags external/autosar/id/m16-0-6
* correctness
* readability
* external/autosar/allocated-target/implementation
* external/autosar/enforcement/automated
* external/autosar/obligation/required
*/
import cpp
import codingstandards.cpp.autosar
import codingstandards.cpp.rules.macroparameternotenclosedinparentheses.MacroParameterNotEnclosedInParentheses
class MacroParameterNotEnclosedInParenthesesCQueryQuery extends MacroParameterNotEnclosedInParenthesesSharedQuery {
MacroParameterNotEnclosedInParenthesesCQueryQuery() {
this = MacrosPackage::functionLikeMacroParameterNotEnclosedInParenthesesQuery()
}
}