From: Richard Smith Date: Wed, 23 Sep 2015 21:30:47 +0000 (+0000) Subject: Remove wrong implication that value-dependent implies instantiation-dependent, X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db9d74b8a315921525f122aff1395ece8491c171;p=clang Remove wrong implication that value-dependent implies instantiation-dependent, and fix the only code that was depending on this so that it sets all the relevant flags appropriately. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248430 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index 4ea3e30a9a..ff09702c76 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -149,8 +149,6 @@ public: /// \brief Set whether this expression is value-dependent or not. void setValueDependent(bool VD) { ExprBits.ValueDependent = VD; - if (VD) - ExprBits.InstantiationDependent = true; } /// isTypeDependent - Determines whether this expression is @@ -169,8 +167,6 @@ public: /// \brief Set whether this expression is type-dependent or not. void setTypeDependent(bool TD) { ExprBits.TypeDependent = TD; - if (TD) - ExprBits.InstantiationDependent = true; } /// \brief Whether this expression is instantiation-dependent, meaning that diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 125a730208..b03337f7d7 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -10811,6 +10811,8 @@ bool Sema::buildOverloadedCallSet(Scope *S, Expr *Fn, CallExpr *CE = new (Context) CallExpr( Context, Fn, Args, Context.DependentTy, VK_RValue, RParenLoc); CE->setTypeDependent(true); + CE->setValueDependent(true); + CE->setInstantiationDependent(true); *Result = CE; return true; }