summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-04-27 17:14:21 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-04-27 17:14:21 +0000
commit595ec5d43c099ea16937c811e4eceab4be8e4d9a (patch)
treebf462c3be14335c5bd6c4b4fc987f19590ac1b7d /clang/lib/AST/ASTContext.cpp
parent5fc8c9eafb06e716130d38cf6212f4b438d4c280 (diff)
downloadbcm5719-llvm-595ec5d43c099ea16937c811e4eceab4be8e4d9a.tar.gz
bcm5719-llvm-595ec5d43c099ea16937c811e4eceab4be8e4d9a.zip
Some refactoring of my ms_struct patch.
// rdar://8823265 related. llvm-svn: 130311
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index e49bde3487e..c571c559bc6 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -536,6 +536,13 @@ void ASTContext::setInstantiatedFromUnnamedFieldDecl(FieldDecl *Inst,
InstantiatedFromUnnamedFieldDecl[Inst] = Tmpl;
}
+bool ASTContext::ZeroBitfieldFollowsNonBitfield(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
OpenPOWER on IntegriCloud