Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a8784e1

Browse filesBrowse files
Simplify DeduplicateMacroResults::Report::ReportResult::toString() for performance reasons
1 parent 333cc77 commit a8784e1
Copy full SHA for a8784e1

File tree

1 file changed

+15
-1
lines changed
Filter options

1 file changed

+15
-1
lines changed

‎cpp/common/src/codingstandards/cpp/alertreporting/DeduplicateMacroResults.qll

Copy file name to clipboardExpand all lines: cpp/common/src/codingstandards/cpp/alertreporting/DeduplicateMacroResults.qll
+15-1Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,21 @@ module DeduplicateMacroResults<
302302
* signature parameter.
303303
*/
304304
class ReportResult extends TReportResult {
305-
string toString() { result = getMessage() }
305+
string toString() {
306+
this = TReportMacroResultWithVariedName(_) and
307+
result =
308+
"Macro that always expands to a result element with invocation-dependent description"
309+
or
310+
this = TReportMacroResultWithSameName(_) and
311+
result = "Macro that always expands to a result element with a constant description"
312+
or
313+
this = TReportIsolatedMacroResult(_) and
314+
result =
315+
"Specific macro expansion which produces a result element, but not all expansions do"
316+
or
317+
this = TReportNotInMacro(_) and
318+
result = "Result element that is not in a macro"
319+
}
306320

307321
string getMessage() {
308322
exists(PrimaryMacroDifferentResultElementInAllInvocations def |

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.