Skip to content

Commit 8d8db4f

Browse files
committed
Declarations1: remove unneeded predicates DCL31-C and DCL37-C
1 parent dfb1815 commit 8d8db4f

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

c/cert/src/rules/DCL31-C/DeclareIdentifiersBeforeUsingThem.ql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,5 @@ import codingstandards.c.cert
1717
from Declaration d
1818
where
1919
not isExcluded(d, Declarations1Package::declareIdentifiersBeforeUsingThemQuery()) and
20-
exists(Specifier s | s = d.getASpecifier() and s.toString() = "implicit_int") and
21-
exists(d.getFile().getRelativePath())
20+
d.hasSpecifier("implicit_int")
2221
select d, "Declaration is missing a type specifier."

cpp/common/src/codingstandards/cpp/rules/declaredareservedidentifier/DeclaredAReservedIdentifier.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Query getQuery() { result instanceof DeclaredAReservedIdentifierSharedQuery }
1414

1515
query predicate problems(Element m, string message) {
1616
not isExcluded(m, getQuery()) and
17-
exists(m.getFile().getRelativePath()) and
1817
exists(string name |
1918
(
2019
m.(Macro).hasName(name) or

0 commit comments

Comments
 (0)