Skip to content

Commit dd0ca34

Browse files
committed
C++: Remove abstract keyword from a couple of AST classes
1 parent b2f1008 commit dd0ca34

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

cpp/ql/src/semmle/code/cpp/File.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import semmle.code.cpp.Declaration
33
import semmle.code.cpp.metrics.MetricFile
44

55
/** A file or folder. */
6-
abstract class Container extends Locatable, @container {
6+
class Container extends Locatable, @container {
77
/**
88
* Gets the absolute, canonical path of this container, using forward slashes
99
* as path separator.
@@ -28,15 +28,15 @@ abstract class Container extends Locatable, @container {
2828
* a bare root prefix, that is, the path has no path segments. A container
2929
* whose absolute path has no segments is always a `Folder`, not a `File`.
3030
*/
31-
abstract string getAbsolutePath();
31+
string getAbsolutePath() { none() } // overridden by subclasses
3232

3333
/**
3434
* DEPRECATED: Use `getLocation` instead.
3535
* Gets a URL representing the location of this container.
3636
*
3737
* For more information see [Providing URLs](https://help.semmle.com/QL/learn-ql/ql/locations.html#providing-urls).
3838
*/
39-
abstract deprecated string getURL();
39+
deprecated string getURL() { none() } // overridden by subclasses
4040

4141
/**
4242
* Gets the relative path of this file or folder from the root folder of the

cpp/ql/src/semmle/code/cpp/Namespace.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class NamespaceDeclarationEntry extends Locatable, @namespace_decl {
130130
/**
131131
* A C++ `using` directive or `using` declaration.
132132
*/
133-
abstract class UsingEntry extends Locatable, @using {
133+
class UsingEntry extends Locatable, @using {
134134
override Location getLocation() { usings(underlyingElement(this), _, result) }
135135
}
136136

cpp/ql/src/semmle/code/cpp/exprs/Cast.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ abstract class Conversion extends Expr {
3434
* a `PointerBaseClassConversion`, or some other semantic conversion. Similarly,
3535
* a `PointerDerivedClassConversion` may also be a `CStyleCast` or a `StaticCast`.
3636
*
37-
* This is an abstract root QL class representing the different casts. For
37+
* This is a root QL class representing the different casts. For
3838
* specific examples, consult the documentation for any of QL classes mentioned above.
3939
*/
40-
abstract class Cast extends Conversion, @cast {
40+
class Cast extends Conversion, @cast {
4141
/**
4242
* Gets a string describing the semantic conversion operation being performed by
4343
* this cast.
@@ -699,7 +699,7 @@ class SizeofPackOperator extends Expr, @sizeof_pack {
699699
/**
700700
* A C/C++ sizeof expression.
701701
*/
702-
abstract class SizeofOperator extends Expr, @runtime_sizeof {
702+
class SizeofOperator extends Expr, @runtime_sizeof {
703703
override int getPrecedence() { result = 16 }
704704
}
705705

@@ -762,7 +762,7 @@ class SizeofTypeOperator extends SizeofOperator {
762762
/**
763763
* A C++11 `alignof` expression.
764764
*/
765-
abstract class AlignofOperator extends Expr, @runtime_alignof {
765+
class AlignofOperator extends Expr, @runtime_alignof {
766766
override int getPrecedence() { result = 16 }
767767
}
768768

0 commit comments

Comments
 (0)