mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
CPP: Repair macro case.
This commit is contained in:
@@ -99,6 +99,7 @@ where // EQExprs are covered by CompareWhereAssignMeant.ql
|
||||
not peivc.(FunctionCall).getTarget().hasName("operator==") and
|
||||
not accessInInitOfForStmt(peivc) and
|
||||
not peivc.isCompilerGenerated() and
|
||||
not exists(Macro m | peivc = m.getAnInvocation().getAnExpandedElement()) and
|
||||
not peivc.isFromTemplateInstantiation(_) and
|
||||
parent = peivc.getParent() and
|
||||
not parent.isInMacroExpansion() and
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
| macros.c:6:9:6:13 | param | This expression has no effect. | macros.c:6:9:6:13 | param | |
|
||||
| preproc.c:89:2:89:4 | call to fn4 | This expression has no effect (because $@ has no external side effects). | preproc.c:33:5:33:7 | fn4 | fn4 |
|
||||
| preproc.c:94:2:94:4 | call to fn9 | This expression has no effect (because $@ has no external side effects). | preproc.c:78:5:78:7 | fn9 | fn9 |
|
||||
| template.cpp:19:3:19:3 | call to operator++ | This expression has no effect (because $@ has no external side effects). | template.cpp:9:10:9:19 | operator++ | operator++ |
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
void test2(int param)
|
||||
{
|
||||
UNUSED(param); // GOOD [FALSE POSITIVE]
|
||||
UNUSED(param); // GOOD
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user