mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
15 lines
335 B
Plaintext
15 lines
335 B
Plaintext
/**
|
|
* @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
|