mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
Move 'snippet' queries to 'snippets' folders
This commit is contained in:
16
cpp/ql/examples/snippets/arrayaccess.ql
Normal file
16
cpp/ql/examples/snippets/arrayaccess.ql
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @name Array access
|
||||
* @description Finds array access expressions with an index expression
|
||||
* consisting of a postfix increment (`++`) expression.
|
||||
* @tags array
|
||||
* access
|
||||
* index
|
||||
* postfix
|
||||
* increment
|
||||
*/
|
||||
|
||||
import cpp
|
||||
|
||||
from ArrayExpr a
|
||||
where a.getArrayOffset() instanceof PostfixIncrExpr
|
||||
select a
|
||||
Reference in New Issue
Block a user