Fix bitfield-instantiation ownership bug noticed by Anders
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67028 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp
index 4c3f100..9372d33 100644
--- a/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/lib/Sema/SemaTemplateInstantiate.cpp
@@ -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(),