@@ -443,7 +443,7 @@ predicate hasTranslatedSyntheticTemporaryObject(Expr expr) {
443
443
* necessary for automatic local variables, or for static local variables with dynamic
444
444
* initialization.
445
445
*/
446
- private predicate translateDeclarationEntry ( PseudoDeclarationEntry entry ) {
446
+ private predicate translateDeclarationEntry ( IRDeclarationEntry entry ) {
447
447
exists ( DeclStmt declStmt , LocalVariable var |
448
448
translateStmt ( declStmt ) and
449
449
declStmt = entry .getStmt ( ) and
@@ -458,8 +458,8 @@ private predicate translateDeclarationEntry(PseudoDeclarationEntry entry) {
458
458
)
459
459
}
460
460
461
- private module PseudoDeclarationEntries {
462
- private newtype TPseudoDeclarationEntry =
461
+ private module IRDeclarationEntries {
462
+ private newtype TIRDeclarationEntry =
463
463
TPresentDeclarationEntry ( DeclarationEntry entry ) or
464
464
TMissingDeclarationEntry ( DeclStmt stmt , Declaration d , int index ) {
465
465
not exists ( stmt .getDeclarationEntry ( index ) ) and
@@ -472,31 +472,31 @@ private module PseudoDeclarationEntries {
472
472
* This class exists to work around the fact that `DeclStmt`s in
473
473
* template instantiations do not have `DeclarationEntry`s.
474
474
*
475
- * So instead, the IR works with `PseudoDeclarationEntry `s that synthesize
476
- * missing `DeclarationEntry`s when there is no result for `DeclStmt::getDeclarationEntry`.
475
+ * So instead, the IR works with `IRDeclarationEntry `s that synthesize missing
476
+ * `DeclarationEntry`s when there is no result for `DeclStmt::getDeclarationEntry`.
477
477
*/
478
- abstract class PseudoDeclarationEntry extends TPseudoDeclarationEntry {
479
- /** Gets a string representation of this `PseudoDeclarationEntry `. */
478
+ abstract class IRDeclarationEntry extends TIRDeclarationEntry {
479
+ /** Gets a string representation of this `IRDeclarationEntry `. */
480
480
abstract string toString ( ) ;
481
481
482
- /** Gets the `DeclStmt` that this `PseudoDeclarationEntry ` belongs to. */
482
+ /** Gets the `DeclStmt` that this `IRDeclarationEntry ` belongs to. */
483
483
abstract DeclStmt getStmt ( ) ;
484
484
485
- /** Gets the `Declaration` declared by this `PseudoDeclarationEntry `. */
485
+ /** Gets the `Declaration` declared by this `IRDeclarationEntry `. */
486
486
abstract Declaration getDeclaration ( ) ;
487
487
488
- /** Gets the AST represented by this `PseudoDeclarationEntry `. */
488
+ /** Gets the AST represented by this `IRDeclarationEntry `. */
489
489
abstract Locatable getAst ( ) ;
490
490
491
491
/**
492
- * Holds if this `PseudoDeclarationEntry ` is the `index`'th entry
492
+ * Holds if this `IRDeclarationEntry ` is the `index`'th entry
493
493
* declared by the enclosing `DeclStmt`.
494
494
*/
495
495
abstract predicate hasIndex ( int index ) ;
496
496
}
497
497
498
- /** A `PseudoDeclarationEntry ` for an existing `DeclarationEntry`. */
499
- private class PresentDeclarationEntry extends PseudoDeclarationEntry , TPresentDeclarationEntry {
498
+ /** A `IRDeclarationEntry ` for an existing `DeclarationEntry`. */
499
+ private class PresentDeclarationEntry extends IRDeclarationEntry , TPresentDeclarationEntry {
500
500
DeclarationEntry entry ;
501
501
502
502
PresentDeclarationEntry ( ) { this = TPresentDeclarationEntry ( entry ) }
@@ -516,7 +516,7 @@ private module PseudoDeclarationEntries {
516
516
* A synthesized `DeclarationEntry` that is created when a `DeclStmt` is missing a
517
517
* result for `DeclStmt::getDeclarationEntry`
518
518
*/
519
- private class MissingDeclarationEntry extends PseudoDeclarationEntry , TMissingDeclarationEntry {
519
+ private class MissingDeclarationEntry extends IRDeclarationEntry , TMissingDeclarationEntry {
520
520
DeclStmt stmt ;
521
521
Declaration d ;
522
522
int index ;
@@ -534,11 +534,11 @@ private module PseudoDeclarationEntries {
534
534
override predicate hasIndex ( int idx ) { idx = index }
535
535
}
536
536
537
- /** A `PseudoDeclarationEntry ` that represents an entry for a `Variable`. */
538
- class PseudoVariableDeclarationEntry instanceof PseudoDeclarationEntry {
537
+ /** A `IRDeclarationEntry ` that represents an entry for a `Variable`. */
538
+ class IRVariableDeclarationEntry instanceof IRDeclarationEntry {
539
539
Variable v ;
540
540
541
- PseudoVariableDeclarationEntry ( ) { super .getDeclaration ( ) = v }
541
+ IRVariableDeclarationEntry ( ) { super .getDeclaration ( ) = v }
542
542
543
543
Variable getDeclaration ( ) { result = v }
544
544
@@ -550,7 +550,7 @@ private module PseudoDeclarationEntries {
550
550
}
551
551
}
552
552
553
- import PseudoDeclarationEntries
553
+ import IRDeclarationEntries
554
554
555
555
newtype TTranslatedElement =
556
556
// An expression that is not being consumed as a condition
@@ -707,10 +707,10 @@ newtype TTranslatedElement =
707
707
)
708
708
} or
709
709
// A local declaration
710
- TTranslatedDeclarationEntry ( PseudoDeclarationEntry entry ) { translateDeclarationEntry ( entry ) } or
710
+ TTranslatedDeclarationEntry ( IRDeclarationEntry entry ) { translateDeclarationEntry ( entry ) } or
711
711
// The dynamic initialization of a static local variable. This is a separate object from the
712
712
// declaration entry.
713
- TTranslatedStaticLocalVariableInitialization ( PseudoDeclarationEntry entry ) {
713
+ TTranslatedStaticLocalVariableInitialization ( IRDeclarationEntry entry ) {
714
714
translateDeclarationEntry ( entry ) and
715
715
entry .getDeclaration ( ) instanceof StaticLocalVariable
716
716
} or
0 commit comments