mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
Merge pull request #338 from geoffw0/hresult
Approved by dave-bartolomeo
This commit is contained in:
@@ -48,6 +48,7 @@ where exists
|
||||
ctls.getControllingExpr() = e1
|
||||
and e1.getType().(TypedefType).hasName("HRESULT")
|
||||
and not isHresultBooleanConverted(e1)
|
||||
and not ctls instanceof SwitchStmt // not controlled by a boolean condition
|
||||
and msg = "Direct usage of a type " + e1.getType().toString() + " as a conditional expression"
|
||||
)
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user