mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01:00
C++: Exclude commas from SwitchStmt.getExpr()
This commit is contained in:
@@ -45,7 +45,7 @@ predicate isParenthesized(CommaExpr ce) {
|
||||
or
|
||||
ce.isUnevaluated() // sizeof(), decltype(), alignof(), noexcept(), typeid()
|
||||
or
|
||||
ce.getParent*() = any(IfStmt i).getCondition()
|
||||
ce.getParent*() = [any(IfStmt i).getCondition(), any(SwitchStmt s).getExpr()]
|
||||
or
|
||||
ce.getParent*() = [any(Loop l).getCondition(), any(ForStmt f).getUpdate()]
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user