From c27d9a682710fa6a3ebcc1de9eaaddf4b2f2527b Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Tue, 27 Jun 2023 10:52:47 +0200 Subject: [PATCH] Remove unused classes from queries --- .../rules/A15-3-3/MissingCatchHandlerInMain.ql | 18 ------------------ ...NotUsedAppropriatelyInVariableDefinition.ql | 5 ----- 2 files changed, 23 deletions(-) diff --git a/cpp/autosar/src/rules/A15-3-3/MissingCatchHandlerInMain.ql b/cpp/autosar/src/rules/A15-3-3/MissingCatchHandlerInMain.ql index e6bf2b99e2..ce3a10f31d 100644 --- a/cpp/autosar/src/rules/A15-3-3/MissingCatchHandlerInMain.ql +++ b/cpp/autosar/src/rules/A15-3-3/MissingCatchHandlerInMain.ql @@ -22,24 +22,6 @@ import codingstandards.cpp.exceptions.ThirdPartyExceptions import codingstandards.cpp.standardlibrary.Exceptions import codingstandards.cpp.EncapsulatingFunctions -/** A `TryStmt` which covers the full body of a function. */ -class FullFunctionBodyTryStmt extends TryStmt { - FullFunctionBodyTryStmt() { - this instanceof FunctionTryStmt - or - exists(Function f, BlockStmt functionBlock | - functionBlock = f.getBlock() and - this = functionBlock.getStmt(0) and - ( - functionBlock.getNumStmt() = 1 - or - functionBlock.getNumStmt() = 2 and - functionBlock.getStmt(1) instanceof ReturnStmt - ) - ) - } -} - /* * The strategy for this query is to find a Stmt in the root BlockStmt which can throw one of the * ExceptionTypes that should be handled. diff --git a/cpp/autosar/src/rules/A7-1-5/AutoSpecifierNotUsedAppropriatelyInVariableDefinition.ql b/cpp/autosar/src/rules/A7-1-5/AutoSpecifierNotUsedAppropriatelyInVariableDefinition.ql index b3da12685c..9c9f8efb81 100644 --- a/cpp/autosar/src/rules/A7-1-5/AutoSpecifierNotUsedAppropriatelyInVariableDefinition.ql +++ b/cpp/autosar/src/rules/A7-1-5/AutoSpecifierNotUsedAppropriatelyInVariableDefinition.ql @@ -19,11 +19,6 @@ import cpp import codingstandards.cpp.autosar -// for readability we define a "fundamental" type -class FundamentalType extends Type { - FundamentalType() { this instanceof BuiltInType } -} - from Variable v where not isExcluded(v,