@@ -124,7 +124,7 @@ class Declaration extends Locatable, @declaration {
124
124
* To test whether this declaration has a particular name in the global
125
125
* namespace, use `hasGlobalName`.
126
126
*/
127
- string getName ( ) { none ( ) }
127
+ string getName ( ) { none ( ) } // overridden in subclasses
128
128
129
129
/** Holds if this declaration has the given name. */
130
130
predicate hasName ( string name ) { name = this .getName ( ) }
@@ -140,7 +140,7 @@ class Declaration extends Locatable, @declaration {
140
140
}
141
141
142
142
/** Gets a specifier of this declaration. */
143
- Specifier getASpecifier ( ) { none ( ) }
143
+ Specifier getASpecifier ( ) { none ( ) } // overridden in subclasses
144
144
145
145
/** Holds if this declaration has a specifier with the given name. */
146
146
predicate hasSpecifier ( string name ) { this .getASpecifier ( ) .hasName ( name ) }
@@ -156,7 +156,7 @@ class Declaration extends Locatable, @declaration {
156
156
* Gets the location of a declaration entry corresponding to this
157
157
* declaration.
158
158
*/
159
- Location getADeclarationLocation ( ) { none ( ) }
159
+ Location getADeclarationLocation ( ) { none ( ) } // overridden in subclasses
160
160
161
161
/**
162
162
* Gets the declaration entry corresponding to this declaration that is a
@@ -165,7 +165,7 @@ class Declaration extends Locatable, @declaration {
165
165
DeclarationEntry getDefinition ( ) { none ( ) }
166
166
167
167
/** Gets the location of the definition, if any. */
168
- Location getDefinitionLocation ( ) { none ( ) }
168
+ Location getDefinitionLocation ( ) { none ( ) } // overridden in subclasses
169
169
170
170
/** Holds if the declaration has a definition. */
171
171
predicate hasDefinition ( ) { exists ( this .getDefinition ( ) ) }
@@ -308,7 +308,7 @@ private class TDeclarationEntry = @var_decl or @type_decl or @fun_decl;
308
308
*/
309
309
class DeclarationEntry extends Locatable , TDeclarationEntry {
310
310
/** Gets a specifier associated with this declaration entry. */
311
- string getASpecifier ( ) { none ( ) }
311
+ string getASpecifier ( ) { none ( ) } // overridden in subclasses
312
312
313
313
/**
314
314
* Gets the name associated with the corresponding definition (where
@@ -331,10 +331,10 @@ class DeclarationEntry extends Locatable, TDeclarationEntry {
331
331
* `I.getADeclarationEntry()` returns `D`
332
332
* but `D.getDeclaration()` only returns `C`
333
333
*/
334
- Declaration getDeclaration ( ) { none ( ) }
334
+ Declaration getDeclaration ( ) { none ( ) } // overridden in subclasses
335
335
336
336
/** Gets the name associated with this declaration entry, if any. */
337
- string getName ( ) { none ( ) }
337
+ string getName ( ) { none ( ) } // overridden in subclasses
338
338
339
339
/**
340
340
* Gets the type associated with this declaration entry.
@@ -343,7 +343,7 @@ class DeclarationEntry extends Locatable, TDeclarationEntry {
343
343
* For function declarations, get the return type of the function.
344
344
* For type declarations, get the type being declared.
345
345
*/
346
- Type getType ( ) { none ( ) }
346
+ Type getType ( ) { none ( ) } // overridden in subclasses
347
347
348
348
/**
349
349
* Gets the type associated with this declaration entry after specifiers
@@ -361,7 +361,7 @@ class DeclarationEntry extends Locatable, TDeclarationEntry {
361
361
predicate hasSpecifier ( string specifier ) { getASpecifier ( ) = specifier }
362
362
363
363
/** Holds if this declaration entry is a definition. */
364
- predicate isDefinition ( ) { none ( ) }
364
+ predicate isDefinition ( ) { none ( ) } // overridden in subclasses
365
365
366
366
override string toString ( ) {
367
367
if isDefinition ( )
@@ -414,7 +414,7 @@ class AccessHolder extends Declaration, TAccessHolder {
414
414
/**
415
415
* Gets the nearest enclosing `AccessHolder`.
416
416
*/
417
- AccessHolder getEnclosingAccessHolder ( ) { none ( ) }
417
+ AccessHolder getEnclosingAccessHolder ( ) { none ( ) } // overridden in subclasses
418
418
419
419
/**
420
420
* Holds if a base class `base` of `derived` _is accessible at_ `this` (N4140
0 commit comments