We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd59737 commit 0cd4e32Copy full SHA for 0cd4e32
1 file changed
cpp/ql/src/Metrics/Internal/ASTConsistency.ql
@@ -0,0 +1,18 @@
1
+/**
2
+ * @name Count AST inconsistencies
3
+ * @description Counts the various AST inconsistencies that may occur.
4
+ * This query is for internal use only and may change without notice.
5
+ * @kind table
6
+ * @id cpp/count-ast-inconsistencies
7
+ */
8
+
9
+import cpp
10
11
+predicate hasDuplicateFunctionEntryPointLocation(Function func) {
12
+ count(func.getEntryPoint().getLocation()) > 1
13
+}
14
15
+predicate hasDuplicateFunctionEntryPoint(Function func) { count(func.getEntryPoint()) > 1 }
16
17
+select count(Function f | hasDuplicateFunctionEntryPoint(f) | f) as duplicateFunctionEntryPoint,
18
+ count(Function f | hasDuplicateFunctionEntryPointLocation(f) | f) as duplicateFunctionEntryPointLocation
0 commit comments