[cfe-commits] r67028 - /cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp

Douglas Gregor dgregor at apple.com
Sun Mar 15 10:43:27 PDT 2009


Author: dgregor
Date: Sun Mar 15 12:43:26 2009
New Revision: 67028

URL: http://llvm.org/viewvc/llvm-project?rev=67028&view=rev
Log:
Fix bitfield-instantiation ownership bug noticed by Anders

Modified:
    cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp

Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp?rev=67028&r1=67027&r2=67028&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp Sun Mar 15 12:43:26 2009
@@ -1042,8 +1042,7 @@
       Expr *BitWidth = Field->getBitWidth();
       if (InvalidDecl)
         BitWidth = 0;
-      if (BitWidth && 
-          (BitWidth->isTypeDependent() || BitWidth->isValueDependent())) {
+      else if (BitWidth) {
         OwningExprResult InstantiatedBitWidth
           = InstantiateExpr(BitWidth, 
                             ClassTemplateSpec->getTemplateArgs(),





More information about the cfe-commits mailing list