C++: Simplify this suppression for specifiers

This commit is contained in:
Jeroen Ketema
2022-08-04 16:38:25 +02:00
parent cc8e9806c4
commit 0e12c9d8b1

View File

@@ -12,7 +12,7 @@ private import semmle.code.cpp.internal.ResolveClass
class Specifier extends Element, @specifier {
/** Gets a dummy location for the specifier. */
override Location getLocation() {
suppressUnusedThis(this) and
exists(this) and
result instanceof UnknownDefaultLocation
}
@@ -300,5 +300,3 @@ class AttributeArgument extends Element, @attribute_arg {
)
}
}
private predicate suppressUnusedThis(Specifier s) { any() }