]> granicus.if.org Git - clang/commitdiff
Remove wrong implication that value-dependent implies instantiation-dependent,
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 23 Sep 2015 21:30:47 +0000 (21:30 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 23 Sep 2015 21:30:47 +0000 (21:30 +0000)
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

include/clang/AST/Expr.h
lib/Sema/SemaOverload.cpp

index 4ea3e30a9a4be09524b6f870198f0632b7398f4a..ff09702c7602f93b9363f416ee07962df90c606f 100644 (file)
@@ -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
index 125a7302088421e58ecc60bafcbd42ed62b6b472..b03337f7d7f574fa5caf87f7862af2503f969ae4 100644 (file)
@@ -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;
     }