summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
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
commitafd7c9c855eeb94dacde5cc3de5f5775b0e60b3f (patch)
treec7ac728d64afcbff457a73058cb1457815195225 /clang/lib/Sema
parent78e2bc032895cfff476a9986fc87d50aebcd1bc4 (diff)
downloadbcm5719-llvm-afd7c9c855eeb94dacde5cc3de5f5775b0e60b3f.tar.gz
bcm5719-llvm-afd7c9c855eeb94dacde5cc3de5f5775b0e60b3f.zip
Fix bitfield-instantiation ownership bug noticed by Anders
llvm-svn: 67028
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiate.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index 4c3f100d74d..9372d337882 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/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(),
OpenPOWER on IntegriCloud