aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-05-02 17:20:56 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-05-02 17:20:56 +0000
commit340fa242130c2d8d74c83edca0952e771aebe0e6 (patch)
treedea1131fbdb6341aeebc382316a1a741262a982f /lib/AST/Decl.cpp
parent0f0cdab31a4f71914b7f654501d69d96e9f378da (diff)
More rule enforcement of zero bitfields for ms_struct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130696 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index e336dd771a..b21ba9a65e 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -2059,7 +2059,8 @@ unsigned FieldDecl::getFieldIndex() const {
if (IsMsStruct) {
// Zero-length bitfields following non-bitfield members are ignored.
- if (getASTContext().ZeroBitfieldFollowsNonBitfield((*i), LastFD)) {
+ if (getASTContext().ZeroBitfieldFollowsNonBitfield((*i), LastFD) ||
+ getASTContext().ZeroBitfieldFollowsBitfield((*i), LastFD)) {
++i;
continue;
}