Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Rule 20.12: Improve performance#241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
lcartey merged 2 commits intomainfromlcartey/20-12-improve-perf
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ import codingstandards.cpp.Macro

from FunctionLikeMacro m, MacroInvocation mi, int i, string expanded, string param
where
not isExcluded(m, Preprocessor2Package::macroParameterUsedAsHashOperandQuery()) and
not isExcluded(mi, Preprocessor2Package::macroParameterUsedAsHashOperandQuery()) and
mi = m.getAnInvocation() and
param = m.getParameter(i) and
(
Expand All@@ -31,9 +31,6 @@ where
// This check ensure there is an expansion that is used.
expanded = mi.getExpandedArgument(i) and
not expanded = "" and
exists(Macro furtherExpandedMacro |
mi.getUnexpandedArgument(i).matches(furtherExpandedMacro.getName() + "%")
)
not mi.getUnexpandedArgument(i) = mi.getExpandedArgument(i)
select m,
"Macro " + m.getName() + " contains use of parameter " + m.getParameter(i) +
" used in multiple contexts."
"Macro " + m.getName() + " contains use of parameter " + param + " used in multiple contexts."
1 change: 1 addition & 0 deletionschange_notes/2023-03-07-20-12-perf.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
*`Rule 20.12` - the performance of this rule has been improved.

[8]ページ先頭

©2009-2025 Movatter.jp