r248430 - Remove wrong implication that value-dependent implies instantiation-dependent,

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 23 14:30:49 PDT 2015


Author: rsmith
Date: Wed Sep 23 16:30:47 2015
New Revision: 248430

URL: http://llvm.org/viewvc/llvm-project?rev=248430&view=rev
Log:
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.

Modified:
    cfe/trunk/include/clang/AST/Expr.h
    cfe/trunk/lib/Sema/SemaOverload.cpp

Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=248430&r1=248429&r2=248430&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Wed Sep 23 16:30:47 2015
@@ -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

Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=248430&r1=248429&r2=248430&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Wed Sep 23 16:30:47 2015
@@ -10811,6 +10811,8 @@ bool Sema::buildOverloadedCallSet(Scope
       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;
     }




More information about the cfe-commits mailing list