]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
lgtm: Fix query for chunk_from_chars()
authorTobias Brunner <tobias@strongswan.org>
Thu, 14 Apr 2022 13:16:38 +0000 (15:16 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 14 Apr 2022 13:28:07 +0000 (15:28 +0200)
`Block` has apparently been deprecated and renamed to `BlockStmt` a while
ago.  Support for `Block` was recently removed completely.

.lgtm/cpp-queries/chunk_from_chars.ql

index c393e7ee5ce42a55f27f07dbb035596f93598041..f60e3e7c94096a3af38775256a2bf0ca2f57c2e9 100644 (file)
@@ -18,7 +18,7 @@ class ChunkFromChars extends Expr {
     this = any(MacroInvocation mi |
       mi.getOutermostMacroAccess().getMacroName() = "chunk_from_chars"
       /* ignore global static uses of the macro */
-      and exists (Block b | mi.getExpr().getEnclosingBlock() = b)
+      and exists (BlockStmt b | mi.getExpr().getEnclosingBlock() = b)
     ).getExpr()
   }
 }
@@ -40,7 +40,7 @@ class ChunkFromCharsUsage extends DataFlow::Configuration {
   }
 }
 
-Block enclosingBlock(Block b) {
+BlockStmt enclosingBlock(BlockStmt b) {
   result = b.getEnclosingBlock()
 }