Skip to content

Commit 40295dc

Browse files
committed
Merge pull request #1428 from bettio/allow-atom-constants
CodeQL: Fix _ATOM handling in non-term-to-term-func After #1413, CodeQL was reporting a lot of noise. These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2 parents 55394d9 + 9967102 commit 40295dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

code-queries/non-term-to-term-func.ql

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ predicate isNotTermOrAtom(Expr expr) {
3434
(mi.toString().matches("%_ATOM") or mi.toString().matches("TERM_%"))
3535
)
3636
) and
37+
not (
38+
expr instanceof EnumConstantAccess and
39+
expr.(EnumConstantAccess).getTarget().toString().matches("%_ATOM")
40+
) and
3741
(
3842
not expr instanceof ConditionalExpr
3943
or

0 commit comments

Comments
 (0)