]> granicus.if.org Git - clang/commitdiff
Fix bitfield-instantiation ownership bug noticed by Anders
authorDouglas Gregor <dgregor@apple.com>
Sun, 15 Mar 2009 17:43:26 +0000 (17:43 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sun, 15 Mar 2009 17:43:26 +0000 (17:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67028 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplateInstantiate.cpp

index 4c3f100d74d0d4fc7f3eee2337700a6122791f7a..9372d337882ffde230f2f955e5ec0adc81f9c674 100644 (file)
@@ -1042,8 +1042,7 @@ Sema::InstantiateClassTemplateSpecialization(
       Expr *BitWidth = Field->getBitWidth();
       if (InvalidDecl)
         BitWidth = 0;
-      if (BitWidth && 
-          (BitWidth->isTypeDependent() || BitWidth->isValueDependent())) {
+      else if (BitWidth) {
         OwningExprResult InstantiatedBitWidth
           = InstantiateExpr(BitWidth, 
                             ClassTemplateSpec->getTemplateArgs(),