aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/Expr.h5
-rw-r--r--lib/Sema/SemaExpr.cpp3
2 files changed, 3 insertions, 5 deletions
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h
index 5cf285bad0..807644349e 100644
--- a/include/clang/AST/Expr.h
+++ b/include/clang/AST/Expr.h
@@ -3398,9 +3398,8 @@ public:
// FIXME: Fix type/value dependence!
BlockDeclRefExpr(ValueDecl *d, QualType t, SourceLocation l, bool ByRef,
bool constAdded = false,
- Stmt *copyConstructorVal = 0,
- bool hasDependentType = false)
- : Expr(BlockDeclRefExprClass, t, hasDependentType, false),
+ Stmt *copyConstructorVal = 0)
+ : Expr(BlockDeclRefExprClass, t, (!t.isNull() && t->isDependentType()),false),
D(d), Loc(l), IsByRef(ByRef),
ConstQualAdded(constAdded), CopyConstructorVal(copyConstructorVal) {}
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 53886e108e..9f9858001e 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -1747,8 +1747,7 @@ Sema::BuildDeclarationNameExpr(const CXXScopeSpec &SS,
QualType T = VD->getType();
BlockDeclRefExpr *BDRE = new (Context) BlockDeclRefExpr(VD,
ExprTy, Loc, false,
- constAdded, 0,
- (getLangOptions().CPlusPlus && T->isDependentType()));
+ constAdded);
if (getLangOptions().CPlusPlus) {
if (!T->isDependentType() && !T->isReferenceType()) {
Expr *E = new (Context)