mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
Move 'snippet' queries to 'snippets' folders
This commit is contained in:
14
cpp/ql/examples/snippets/throw_exception.ql
Normal file
14
cpp/ql/examples/snippets/throw_exception.ql
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @name Throw exception of type
|
||||
* @description Finds places where we throw `parse_error` or one of its sub-types
|
||||
* @tags base
|
||||
* class
|
||||
* throw
|
||||
* exception
|
||||
*/
|
||||
|
||||
import cpp
|
||||
|
||||
from ThrowExpr throw
|
||||
where throw.getType().(Class).getABaseClass*().getName() = "parse_error"
|
||||
select throw
|
||||
Reference in New Issue
Block a user