Merge pull request #338 from geoffw0/hresult

Approved by dave-bartolomeo
This commit is contained in:
semmle-qlci
2018-10-29 17:04:54 +00:00
committed by GitHub
4 changed files with 47 additions and 0 deletions

View File

@@ -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