diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-05-24 20:13:53 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-05-24 20:13:53 +0000 |
| commit | e05d3cb770d1b710c15bfdb89a417d48e3226741 (patch) | |
| tree | 9064e705cf2c0d8020ba9565f4b936138c04c3ff /clang/lib/AST/ASTContext.cpp | |
| parent | 722bff2c7dd668fbbaddf7891924474efcbf16e9 (diff) | |
| download | bcm5719-llvm-e05d3cb770d1b710c15bfdb89a417d48e3226741.tar.gz bcm5719-llvm-e05d3cb770d1b710c15bfdb89a417d48e3226741.zip | |
A type- or value-dependent expression cannot use bitfield
promotion. Fixes <rdar://problem/8020920>.
llvm-svn: 104545
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index d6e094e5b4a..aa98910f0ff 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -2729,6 +2729,9 @@ unsigned ASTContext::getIntegerRank(Type *T) { /// \returns the type this bit-field will promote to, or NULL if no /// promotion occurs. QualType ASTContext::isPromotableBitField(Expr *E) { + if (E->isTypeDependent() || E->isValueDependent()) + return QualType(); + FieldDecl *Field = E->getBitField(); if (!Field) return QualType(); |

