diff --git a/cpp/autosar/src/rules/A14-5-2/NonTemplateMemberDefinedInTemplate.ql b/cpp/autosar/src/rules/A14-5-2/NonTemplateMemberDefinedInTemplate.ql index a8fb1ace66..5e0e88e1a3 100644 --- a/cpp/autosar/src/rules/A14-5-2/NonTemplateMemberDefinedInTemplate.ql +++ b/cpp/autosar/src/rules/A14-5-2/NonTemplateMemberDefinedInTemplate.ql @@ -170,7 +170,7 @@ where ) and // Omit using alias (cf. https://github.com/github/codeql-coding-standards/issues/739) // Exclude Using alias which refer directly to a TypeParameter - not d.(UsingAliasTypedefType).getBaseType() instanceof TypeTemplateParameter + not d.(TypeAliasType).getBaseType() instanceof TypeTemplateParameter select d, "Member " + d.getName() + " template class does not use any of template arguments of its $@.", d.getDeclaringType(), "declaring type" diff --git a/cpp/autosar/src/rules/M3-2-3/MultipleDeclarationViolation.ql b/cpp/autosar/src/rules/M3-2-3/MultipleDeclarationViolation.ql index 30d94facb1..ce928f61ed 100644 --- a/cpp/autosar/src/rules/M3-2-3/MultipleDeclarationViolation.ql +++ b/cpp/autosar/src/rules/M3-2-3/MultipleDeclarationViolation.ql @@ -36,7 +36,7 @@ where kind = "variable" or de.getDeclaration() instanceof Type and - not de.getDeclaration() instanceof UsingAliasTypedefType and + not de.getDeclaration() instanceof TypeAliasType and kind = "type" ) and not otherDeclaration.isDefinition() and diff --git a/cpp/common/src/codingstandards/cpp/types/Uses.qll b/cpp/common/src/codingstandards/cpp/types/Uses.qll index 3cd63f4bc7..cb70e5fa7d 100644 --- a/cpp/common/src/codingstandards/cpp/types/Uses.qll +++ b/cpp/common/src/codingstandards/cpp/types/Uses.qll @@ -98,7 +98,7 @@ private Locatable getATypeUse_i(Type type, string reason) { or // Unless it's an alias template instantiation, as they do not have correct locations (last // verified in CodeQL CLI 2.7.6) - result instanceof UsingAliasTypedefType and + result instanceof TypeAliasType and not exists(result.getLocation()) ) and ( @@ -203,7 +203,7 @@ private Locatable getATypeUse_i(Type type, string reason) { // Alias templates - alias templates and instantiations are not properly captured by the // extractor (last verified in CodeQL CLI 2.7.6). The only distinguishing factor is that // instantiations of alias templates do not have a location. - exists(UsingAliasTypedefType template, UsingAliasTypedefType instantiation | + exists(TypeAliasType template, TypeAliasType instantiation | // Instantiation is a "use" of the template used = instantiation and type = template and diff --git a/cpp/misra/src/rules/RULE-4-1-2/UseOfDeprecatedFunctionBinderTypedefMember.ql b/cpp/misra/src/rules/RULE-4-1-2/UseOfDeprecatedFunctionBinderTypedefMember.ql index b31d217b71..f928457b08 100644 --- a/cpp/misra/src/rules/RULE-4-1-2/UseOfDeprecatedFunctionBinderTypedefMember.ql +++ b/cpp/misra/src/rules/RULE-4-1-2/UseOfDeprecatedFunctionBinderTypedefMember.ql @@ -58,7 +58,7 @@ class FunctionTypeByNestedClass extends FunctionTypeWithBindings { } } -class DeprecatedFunctionBinderTypedefMember extends UsingAliasTypedefType { +class DeprecatedFunctionBinderTypedefMember extends TypeAliasType { ClassTemplateInstantiation cti; DeprecatedFunctionBinderTypedefMember() { diff --git a/cpp/misra/src/rules/RULE-4-1-2/UseOfDeprecatedStdAllocatorMember.ql b/cpp/misra/src/rules/RULE-4-1-2/UseOfDeprecatedStdAllocatorMember.ql index 72a73a9b82..74f41437bd 100644 --- a/cpp/misra/src/rules/RULE-4-1-2/UseOfDeprecatedStdAllocatorMember.ql +++ b/cpp/misra/src/rules/RULE-4-1-2/UseOfDeprecatedStdAllocatorMember.ql @@ -24,7 +24,7 @@ abstract class DeprecatedUse extends Element { abstract string getAUseDescription(); } -class DeprecatedAllocatorUsingMember extends UsingAliasTypedefType, DeprecatedUse { +class DeprecatedAllocatorUsingMember extends TypeAliasType, DeprecatedUse { ClassTemplateInstantiation cti; DeprecatedAllocatorUsingMember() {