[cfe-commits] r94466 - /cfe/trunk/lib/Parse/Parser.cpp
John McCall
rjmccall at apple.com
Mon Jan 25 15:12:50 PST 2010
Author: rjmccall
Date: Mon Jan 25 17:12:50 2010
New Revision: 94466
URL: http://llvm.org/viewvc/llvm-project?rev=94466&view=rev
Log:
Fixit to remove 'volatile' in file-scope 'asm volatile'.
Modified:
cfe/trunk/lib/Parse/Parser.cpp
Modified: cfe/trunk/lib/Parse/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/Parser.cpp?rev=94466&r1=94465&r2=94466&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/Parser.cpp (original)
+++ cfe/trunk/lib/Parse/Parser.cpp Mon Jan 25 17:12:50 2010
@@ -836,7 +836,12 @@
SourceLocation Loc = ConsumeToken();
if (Tok.is(tok::kw_volatile)) {
- Diag(Tok, diag::warn_file_asm_volatile);
+ // Remove from the end of 'asm' to the end of 'volatile'.
+ SourceRange RemovalRange(PP.getLocForEndOfToken(Loc),
+ PP.getLocForEndOfToken(Tok.getLocation()));
+
+ Diag(Tok, diag::warn_file_asm_volatile)
+ << CodeModificationHint::CreateRemoval(RemovalRange);
ConsumeToken();
}
More information about the cfe-commits
mailing list