diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2011-05-02 17:20:56 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-05-02 17:20:56 +0000 |
| commit | eb39741c0b4ab018d8e416cac82336e7a292e212 (patch) | |
| tree | 22713a690863962536518a8e4176764aef1b84e2 /clang/lib/AST/ASTContext.cpp | |
| parent | d47ba853fc0a1e5149f18ee3f5fdf59699169eb5 (diff) | |
| download | bcm5719-llvm-eb39741c0b4ab018d8e416cac82336e7a292e212.tar.gz bcm5719-llvm-eb39741c0b4ab018d8e416cac82336e7a292e212.zip | |
More rule enforcement of zero bitfields for ms_struct.
llvm-svn: 130696
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 1f4d9a37186..8316ea68e9e 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -543,6 +543,13 @@ bool ASTContext::ZeroBitfieldFollowsNonBitfield(const FieldDecl *FD, } +bool ASTContext::ZeroBitfieldFollowsBitfield(const FieldDecl *FD, + const FieldDecl *LastFD) const { + return (FD->isBitField() && LastFD && LastFD->isBitField() && + FD->getBitWidth()-> EvaluateAsInt(*this).getZExtValue() == 0); + +} + ASTContext::overridden_cxx_method_iterator ASTContext::overridden_methods_begin(const CXXMethodDecl *Method) const { llvm::DenseMap<const CXXMethodDecl *, CXXMethodVector>::const_iterator Pos |

