aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-03-15 17:43:26 +0000
committerDouglas Gregor <dgregor@apple.com>2009-03-15 17:43:26 +0000
commit3e287c2a53e88d583fa2e0cafc33dbb49772db05 (patch)
tree47055cb10f2f087b9ef026a05087db13fb7345cd /lib/Sema/SemaTemplateInstantiate.cpp
parent77d81422f8db885bbe4740eb90debf4248478890 (diff)
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
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiate.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp
index 4c3f100d74..9372d33788 100644
--- a/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/lib/Sema/SemaTemplateInstantiate.cpp
@@ -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(),