Fix up expected IR output after rebase.

This commit is contained in:
Ziemowit Laski
2019-07-13 12:57:25 -07:00
parent 960a41be85
commit c906560edd
2 changed files with 33 additions and 0 deletions

View File

@@ -322,6 +322,8 @@ class ErroneousType extends BuiltInType {
ErroneousType() { builtintypes(underlyingElement(this),_,1,_,_,_) }
/** Canonical QL class corresponding to this element. */
override string getCanonicalQLClass() { result = "ErroneousType" }
}
/**
@@ -921,6 +923,9 @@ class ReferenceType extends DerivedType {
ReferenceType() { derivedtypes(underlyingElement(this),_,2,_) or derivedtypes(underlyingElement(this),_,8,_) }
/** Canonical QL class corresponding to this element. */
override string getCanonicalQLClass() { result = "ReferenceType" }
override int getPointerIndirectionLevel() {
result = getBaseType().getPointerIndirectionLevel()
}

View File

@@ -190,6 +190,34 @@ bad_asts.cpp:
# 27| Type = [LValueReferenceType]: const Point &
# 27| ValueCategory = prvalue(load)
# 28| 1: [ReturnStmt]: return ...
# 30| [TopLevelFunction]: void Bad::errorExpr()
# 30| params:
# 30| body: [Block]: { ... }
# 31| 0: [DeclStmt]: declaration
# 31| 0: [VariableDeclarationEntry]: definition of intref
# 31| Type = [LValueReferenceType]: int &
# 31| init: [Initializer]: initializer for intref
# 31| expr: [ErrorExpr]: <error expr>
# 31| Type = [ErroneousType]: error
# 31| ValueCategory = prvalue
# 32| 1: [DeclStmt]: declaration
# 32| 0: [VariableDeclarationEntry]: definition of x
# 32| Type = [IntType]: int
# 32| init: [Initializer]: initializer for x
# 32| expr: [ErrorExpr]: <error expr>
# 32| Type = [ErroneousType]: error
# 32| ValueCategory = prvalue
# 33| 2: [ExprStmt]: ExprStmt
# 33| 0: [AssignExpr]: ... = ...
# 33| Type = [IntType]: int
# 33| ValueCategory = lvalue
# 33| 0: [VariableAccess]: x
# 33| Type = [IntType]: int
# 33| ValueCategory = lvalue
#-----| 1: [ErrorExpr]: <error expr>
#-----| Type = [ErroneousType]: error
#-----| ValueCategory = prvalue(load)
# 34| 3: [ReturnStmt]: return ...
clang.cpp:
# 5| [TopLevelFunction]: int* globalIntAddress()
# 5| params: