mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
18 lines
359 B
Plaintext
18 lines
359 B
Plaintext
/**
|
|
* @id cpp/examples/switchcase
|
|
* @name Switch statement case missing
|
|
* @description Finds switch statements with a missing enum constant case
|
|
* and no default case
|
|
* @tags switch
|
|
* case
|
|
* enum
|
|
*/
|
|
|
|
import cpp
|
|
|
|
from EnumSwitch es, EnumConstant ec
|
|
where
|
|
ec = es.getAMissingCase() and
|
|
not es.hasDefaultCase()
|
|
select es, ec
|