Skip to content

Commit 3780d35

Browse files
committed
Preprocessor5: add implementation notes
1 parent 531b1e6 commit 3780d35

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

rule_packages/c/Preprocessor5.json

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
"tags": [
1616
"correctness",
1717
"readability"
18-
]
18+
],
19+
"implementation_scope": {
20+
"description": "This query reports locations corresponding to both redefinitions of those standard library macros as well as locations where the identifiers used for accesses.",
21+
"items": []
22+
}
1923
}
2024
],
2125
"title": "Do not treat a predefined identifier as an object if it might only be implemented as a macro"
@@ -35,7 +39,11 @@
3539
"tags": [
3640
"correctness",
3741
"readability"
38-
]
42+
],
43+
"implementation_scope": {
44+
"description": "This query defines end of function call as the next node in the control flow graph.",
45+
"items": []
46+
}
3947
}
4048
],
4149
"title": "Do not use preprocessor directives in invocations of function-like macros"
@@ -58,7 +66,11 @@
5866
"tags": [
5967
"correctness",
6068
"readability"
61-
]
69+
],
70+
"implementation_scope": {
71+
"description": "This query checks for every instance of a parameter to be enclosed in parentheses regardless of whether the expansion of that parameter forms an expression or not.",
72+
"items": []
73+
}
6274
}
6375
],
6476
"title": "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses"

rule_packages/cpp/Macros.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,11 @@
192192
"tags": [
193193
"correctness",
194194
"readability"
195-
]
195+
],
196+
"implementation_scope": {
197+
"description": "This query checks for every instance of a parameter to be enclosed in parentheses regardless of whether the expansion of that parameter forms an expression or not.",
198+
"items": []
199+
}
196200
}
197201
],
198202
"title": "In the definition of a function-like macro, each instance of a parameter shall be enclosed in parentheses, unless it is used as the operand of # or ##."

0 commit comments

Comments
 (0)