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 | d98114647e16796a976b04af79975b4f0eacf22b (patch) | |
tree | 2a487e4c37a4dc3fb24adaf72f9df37174939d1c /lib | |
parent | aa8b2d95bc108e8f3a443e4a936e1ed8a3cc1cc6 (diff) |
Fix a bunch of IndirectFieldDecl-related warnings.
- Negative ChainingSize doesn't make sense, make it unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/Decl.cpp | 7 | ||||
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index ef8f16861e..9664fe2684 100644 --- a/lib/AST/Decl.cpp +++ b/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/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 37561028c2..d8f3ccf8a4 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/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(); } |