]> granicus.if.org Git - clang/commitdiff
cleanup instantiation code, tighten testcase
authorGabor Greif <ggreif@gmail.com>
Wed, 18 Mar 2009 01:16:08 +0000 (01:16 +0000)
committerGabor Greif <ggreif@gmail.com>
Wed, 18 Mar 2009 01:16:08 +0000 (01:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67148 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplateInstantiate.cpp
test/SemaTemplate/instantiate-expr-2.cpp

index a943d4e2a054aa858a60de1a3d476f35d0124830..59b795d0f5d50f74b937cf850c80da78da0b2f67 100644 (file)
@@ -846,9 +846,6 @@ TemplateExprInstantiator::VisitConditionalOperator(ConditionalOperator *E) {
   if (Result.isInvalid())
     return SemaRef.ExprError();
 
-/*  Cond.release();
-  True.release();
-  False.release();*/
   return move(Result);
 }
 
index 82cd757e686d51b402bd097384d1d41db3d0dc44..7cfaa9c8ee431dfa19833444f1ff6dad9dc40c3c 100644 (file)
@@ -95,7 +95,11 @@ namespace N6 {
   };
 
   typedef Cond<true, int, char>::True True;
-  typedef Cond<false, int, char>::False False;
+  typedef Cond<true, int, char>::False False;
+
+  // check that we have the right types
+  Lookup<1> const &L1(False());
+  Lookup<sizeof(int)> const &L2(True());
 }