mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Move 'snippet' queries to 'snippets' folders
This commit is contained in:
14
cpp/ql/examples/snippets/ternaryconditional.ql
Normal file
14
cpp/ql/examples/snippets/ternaryconditional.ql
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @name Conditional expressions
|
||||
* @description Finds conditional expressions of the form `... ? ... : ...`
|
||||
* where the types of the resulting expressions differ
|
||||
* @tags conditional
|
||||
* ternary
|
||||
* type
|
||||
*/
|
||||
|
||||
import cpp
|
||||
|
||||
from ConditionalExpr e
|
||||
where e.getThen().getType() != e.getElse().getType()
|
||||
select e
|
||||
Reference in New Issue
Block a user