Pass the location of the type.

llvm-svn: 41612
This commit is contained in:
Chris Lattner 2007-08-30 17:08:45 +00:00
parent 55343038f4
commit e4ee2dfcf5
2 changed files with 3 additions and 2 deletions

View File

@ -776,6 +776,7 @@ Parser::ExprResult Parser::ParseBuiltinPrimaryExpression() {
break;
case tok::kw___builtin_offsetof: {
SourceLocation TypeLoc = Tok.getLocation();
TypeTy *Ty = ParseTypeName();
if (ExpectAndConsume(tok::comma, diag::err_expected_comma, "",tok::r_paren))
@ -826,7 +827,7 @@ Parser::ExprResult Parser::ParseBuiltinPrimaryExpression() {
Comps.back().LocEnd =
MatchRHSPunctuation(tok::r_square, Comps.back().LocStart);
} else if (Tok.getKind() == tok::r_paren) {
Res = Actions.ParseBuiltinOffsetOf(StartLoc, Ty, &Comps[0],
Res = Actions.ParseBuiltinOffsetOf(StartLoc, TypeLoc, Ty, &Comps[0],
Comps.size(), ConsumeParen());
break;
} else {

View File

@ -387,7 +387,7 @@ public:
};
virtual ExprResult ParseBuiltinOffsetOf(SourceLocation BuiltinLoc,
TypeTy *Arg1,
SourceLocation TypeLoc, TypeTy *Arg1,
OffsetOfComponent *CompPtr,
unsigned NumComponents,
SourceLocation RParenLoc) {