[cfe-commits] r138684 - /cfe/trunk/lib/Parse/ParseInit.cpp
Douglas Gregor
dgregor at apple.com
Fri Aug 26 17:13:16 PDT 2011
Author: dgregor
Date: Fri Aug 26 19:13:16 2011
New Revision: 138684
URL: http://llvm.org/viewvc/llvm-project?rev=138684&view=rev
Log:
Improve caret location for the GNU old-style field designator warning, from David Blaikie
Modified:
cfe/trunk/lib/Parse/ParseInit.cpp
Modified: cfe/trunk/lib/Parse/ParseInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseInit.cpp?rev=138684&r1=138683&r2=138684&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseInit.cpp (original)
+++ cfe/trunk/lib/Parse/ParseInit.cpp Fri Aug 26 19:13:16 2011
@@ -90,7 +90,7 @@
assert(Tok.is(tok::colon) && "MayBeDesignationStart not working properly!");
SourceLocation ColonLoc = ConsumeToken();
- Diag(Tok, diag::ext_gnu_old_style_field_designator)
+ Diag(NameLoc, diag::ext_gnu_old_style_field_designator)
<< FixItHint::CreateReplacement(SourceRange(NameLoc, ColonLoc),
NewSyntax.str());
More information about the cfe-commits
mailing list