lgtm: Fix query for chunk_from_chars()

`Block` has apparently been deprecated and renamed to `BlockStmt` a while
ago.  Support for `Block` was recently removed completely.
This commit is contained in:
Tobias Brunner
2022-04-14 15:28:07 +02:00
parent 3c028686de
commit 63260a11ca
+2 -2
View File
@@ -18,7 +18,7 @@ class ChunkFromChars extends Expr {
this = any(MacroInvocation mi | this = any(MacroInvocation mi |
mi.getOutermostMacroAccess().getMacroName() = "chunk_from_chars" mi.getOutermostMacroAccess().getMacroName() = "chunk_from_chars"
/* ignore global static uses of the macro */ /* ignore global static uses of the macro */
and exists (Block b | mi.getExpr().getEnclosingBlock() = b) and exists (BlockStmt b | mi.getExpr().getEnclosingBlock() = b)
).getExpr() ).getExpr()
} }
} }
@@ -40,7 +40,7 @@ class ChunkFromCharsUsage extends DataFlow::Configuration {
} }
} }
Block enclosingBlock(Block b) { BlockStmt enclosingBlock(BlockStmt b) {
result = b.getEnclosingBlock() result = b.getEnclosingBlock()
} }