diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-03-15 17:43:26 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-03-15 17:43:26 +0000 |
commit | afd7c9c855eeb94dacde5cc3de5f5775b0e60b3f (patch) | |
tree | c7ac728d64afcbff457a73058cb1457815195225 /clang/lib/Sema | |
parent | 78e2bc032895cfff476a9986fc87d50aebcd1bc4 (diff) | |
download | bcm5719-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.cpp | 3 |
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(), |