summaryrefslogtreecommitdiffstats
path: root/lib/AST
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST')
-rw-r--r--lib/AST/DeclTemplate.cpp2
-rw-r--r--lib/AST/Expr.cpp2
-rw-r--r--lib/AST/ExprConstant.cpp1
-rw-r--r--lib/AST/Type.cpp4
4 files changed, 6 insertions, 3 deletions
diff --git a/lib/AST/DeclTemplate.cpp b/lib/AST/DeclTemplate.cpp
index f00eb04..9e1d79d 100644
--- a/lib/AST/DeclTemplate.cpp
+++ b/lib/AST/DeclTemplate.cpp
@@ -223,7 +223,7 @@ ClassTemplateDecl::getInjectedClassNameSpecialization() {
} else if (NonTypeTemplateParmDecl *NTTP =
dyn_cast<NonTypeTemplateParmDecl>(*Param)) {
Expr *E = new (Context) DeclRefExpr(NTTP,
- NTTP->getType().getNonReferenceType(),
+ NTTP->getType().getNonLValueExprType(Context),
NTTP->getLocation());
TemplateArgs.push_back(TemplateArgument(E));
} else {
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index bd97b88..6524a31 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -684,6 +684,8 @@ const char *CastExpr::getCastKindName() const {
return "Unknown";
case CastExpr::CK_BitCast:
return "BitCast";
+ case CastExpr::CK_LValueBitCast:
+ return "LValueBitCast";
case CastExpr::CK_NoOp:
return "NoOp";
case CastExpr::CK_BaseToDerived:
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index a963182..3c97420 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -563,6 +563,7 @@ bool PointerExprEvaluator::VisitCastExpr(CastExpr* E) {
case CastExpr::CK_NoOp:
case CastExpr::CK_BitCast:
+ case CastExpr::CK_LValueBitCast:
case CastExpr::CK_AnyPointerToObjCPointerCast:
case CastExpr::CK_AnyPointerToBlockPointerCast:
return Visit(SubExpr);
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index ab64eaf..d7929304 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -992,7 +992,7 @@ const char *BuiltinType::getName(const LangOptions &LO) const {
void FunctionType::ANCHOR() {} // Key function for FunctionType.
-QualType QualType::getCallResultType(ASTContext &Context) const {
+QualType QualType::getNonLValueExprType(ASTContext &Context) const {
if (const ReferenceType *RefType = getTypePtr()->getAs<ReferenceType>())
return RefType->getPointeeType();
@@ -1002,7 +1002,7 @@ QualType QualType::getCallResultType(ASTContext &Context) const {
//
// See also C99 6.3.2.1p2.
if (!Context.getLangOptions().CPlusPlus ||
- !getTypePtr()->isDependentType() && !getTypePtr()->isRecordType())
+ (!getTypePtr()->isDependentType() && !getTypePtr()->isRecordType()))
return getUnqualifiedType();
return *this;
OpenPOWER on IntegriCloud