[cfe-commits] r41612 - in /cfe/trunk: Parse/ParseExpr.cpp include/clang/Parse/Action.h
Chris Lattner
sabre at nondot.org
Thu Aug 30 10:08:45 PDT 2007
Author: lattner
Date: Thu Aug 30 12:08:45 2007
New Revision: 41612
URL: http://llvm.org/viewvc/llvm-project?rev=41612&view=rev
Log:
Pass the location of the type.
Modified:
cfe/trunk/Parse/ParseExpr.cpp
cfe/trunk/include/clang/Parse/Action.h
Modified: cfe/trunk/Parse/ParseExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/ParseExpr.cpp?rev=41612&r1=41611&r2=41612&view=diff
==============================================================================
--- cfe/trunk/Parse/ParseExpr.cpp (original)
+++ cfe/trunk/Parse/ParseExpr.cpp Thu Aug 30 12:08:45 2007
@@ -776,6 +776,7 @@
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 @@
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 {
Modified: cfe/trunk/include/clang/Parse/Action.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Action.h?rev=41612&r1=41611&r2=41612&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/Action.h (original)
+++ cfe/trunk/include/clang/Parse/Action.h Thu Aug 30 12:08:45 2007
@@ -387,7 +387,7 @@
};
virtual ExprResult ParseBuiltinOffsetOf(SourceLocation BuiltinLoc,
- TypeTy *Arg1,
+ SourceLocation TypeLoc, TypeTy *Arg1,
OffsetOfComponent *CompPtr,
unsigned NumComponents,
SourceLocation RParenLoc) {
More information about the cfe-commits
mailing list