Submitted by:
Reviewed by:
Down to 0 warning/errors for Carbon.h. Also made a couple trivial name
changes...

llvm-svn: 39358
This commit is contained in:
Steve Naroff 2007-03-16 01:36:44 +00:00
parent 6fbf0dcb6e
commit 97035855e3
5 changed files with 10 additions and 4 deletions

View File

@ -99,6 +99,11 @@ static TypeRef DecodeTypeFromStr(const char *&Str, ASTContext &Context) {
if (Long)
return Context.LongDoubleTy;
return Context.DoubleTy;
case 's':
assert(!LongLong && "Bad modifiers used with 's'!");
if (Unsigned)
return Context.UnsignedShortTy;
return Context.ShortTy;
//case 'i':
}
}

View File

@ -50,7 +50,7 @@ bool Type::isIncompleteType() const {
// - Forward declarations (extern int matrix[][7]).
// - The last component of a structure (flexible array idiom).
// Clients of this routine will need to determine if the size is required.
return cast<ArrayType>(this)->getSizeExpression() == 0;
return cast<ArrayType>(this)->getSize() == 0;
}
}

View File

@ -48,5 +48,6 @@ BUILTIN(__builtin_infl , "Ld" , "nc")
BUILTIN(__builtin_fabs , "dd" , "nc")
BUILTIN(__builtin_fabsf, "ff" , "nc")
BUILTIN(__builtin_fabsl, "LdLd", "nc")
BUILTIN(__builtin_constant_p, "UsUs", "nc")
#undef BUILTIN

View File

@ -281,13 +281,13 @@ public:
TypeRef getElementType() const { return ElementType; }
ArraySizeModifier getSizeModifier() const { return SizeModifier; }
unsigned getIndexTypeQualifier() const { return IndexTypeQuals; }
Expr *getSizeExpression() const { return SizeExpr; }
Expr *getSize() const { return SizeExpr; }
virtual void getAsString(std::string &InnerString) const;
void Profile(FoldingSetNodeID &ID) {
Profile(ID, getSizeModifier(), getIndexTypeQualifier(), getElementType(),
getSizeExpression());
getSize());
}
static void Profile(FoldingSetNodeID &ID, ArraySizeModifier SizeModifier,
unsigned IndexTypeQuals, TypeRef ElementType,

View File

@ -255,7 +255,7 @@ struct DeclaratorChunk {
/// This is the size of the array, or null if [] or [*] was specified.
/// Since the parser is multi-purpose, and we don't want to impose a root
/// expression class on all clients, NumElts is untyped.
void *NumElts;
Action::ExprTy *NumElts;
void destroy() {}
};