diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-11-21 14:11:41 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-11-21 14:11:41 +0000 |
| commit | 3959370c92a29385869d00f18812f48e685df827 (patch) | |
| tree | 64abeda0e57951407bc9367544cc9f99d6b5f461 /clang/lib | |
| parent | cf4bceba49a8ce888ec205b90a2159256ec915bd (diff) | |
| download | bcm5719-llvm-3959370c92a29385869d00f18812f48e685df827.tar.gz bcm5719-llvm-3959370c92a29385869d00f18812f48e685df827.zip | |
Fix a bunch of IndirectFieldDecl-related warnings.
- Negative ChainingSize doesn't make sense, make it unsigned.
llvm-svn: 119943
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/AST/Decl.cpp | 7 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index ef8f16861e2..9664fe26849 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -2030,9 +2030,10 @@ EnumConstantDecl *EnumConstantDecl::Create(ASTContext &C, EnumDecl *CD, return new (C) EnumConstantDecl(CD, L, Id, T, E, V); } -IndirectFieldDecl *IndirectFieldDecl::Create(ASTContext &C, DeclContext *DC, - SourceLocation L, IdentifierInfo *Id, - QualType T, NamedDecl **CH, int CHS) { +IndirectFieldDecl * +IndirectFieldDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, + IdentifierInfo *Id, QualType T, NamedDecl **CH, + unsigned CHS) { return new (C) IndirectFieldDecl(DC, L, Id, T, CH, CHS); } diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 37561028c26..d8f3ccf8a4d 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -7913,7 +7913,7 @@ ExprResult Sema::BuildBuiltinOffsetOf(SourceLocation BuiltinLoc, FieldDecl *MemberDecl = R.getAsSingle<FieldDecl>(); IndirectFieldDecl *IndirectMemberDecl = 0; if (!MemberDecl) { - if (IndirectMemberDecl = R.getAsSingle<IndirectFieldDecl>()) + if ((IndirectMemberDecl = R.getAsSingle<IndirectFieldDecl>())) MemberDecl = IndirectMemberDecl->getAnonField(); } |

