[cfe-commits] r86962 - /cfe/trunk/tools/clang-cc/clang-cc.cpp
Daniel Dunbar
daniel at zuster.org
Wed Nov 11 22:48:24 PST 2009
Author: ddunbar
Date: Thu Nov 12 00:48:24 2009
New Revision: 86962
URL: http://llvm.org/viewvc/llvm-project?rev=86962&view=rev
Log:
clang-cc: -fixit is actually option, not an action, although its use with non
-fsyntax-only is probably untested.
Modified:
cfe/trunk/tools/clang-cc/clang-cc.cpp
Modified: cfe/trunk/tools/clang-cc/clang-cc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/clang-cc.cpp?rev=86962&r1=86961&r2=86962&view=diff
==============================================================================
--- cfe/trunk/tools/clang-cc/clang-cc.cpp (original)
+++ cfe/trunk/tools/clang-cc/clang-cc.cpp Thu Nov 12 00:48:24 2009
@@ -102,7 +102,6 @@
RewriteBlocks, // ObjC->C Rewriter for Blocks.
RewriteMacros, // Expand macros but not #includes.
RewriteTest, // Rewriter playground
- FixIt, // Fix-It Rewriter
HTMLTest, // HTML displayer testing stuff.
EmitAssembly, // Emit a .s file.
EmitLLVM, // Emit a .ll file.
@@ -182,8 +181,6 @@
"Expand macros without full preprocessing"),
clEnumValN(RewriteBlocks, "rewrite-blocks",
"Rewrite Blocks to C"),
- clEnumValN(FixIt, "fixit",
- "Apply fix-it advice to the input source"),
clEnumValEnd));
@@ -425,6 +422,10 @@
//===----------------------------------------------------------------------===//
// Fix-It Options
//===----------------------------------------------------------------------===//
+
+static llvm::cl::opt<bool>
+FixItAll("fixit", llvm::cl::desc("Apply fix-it advice to the input source"));
+
static llvm::cl::list<ParsedSourceLocation>
FixItAtLocations("fixit-at", llvm::cl::value_desc("source-location"),
llvm::cl::desc("Perform Fix-It modifications at the given source location"));
@@ -608,7 +609,6 @@
return CreateBlockRewriter(InFile, PP.getDiagnostics(),
PP.getLangOptions());
- case FixIt: // We add the rewriter later.
case ParseSyntaxOnly:
return new ASTConsumer();
@@ -725,7 +725,7 @@
}
// Check if we want a fix-it rewriter.
- if (PA == FixIt || !FixItAtLocations.empty()) {
+ if (FixItAll || !FixItAtLocations.empty()) {
FixItRewrite = new FixItRewriter(PP.getDiagnostics(),
PP.getSourceManager(),
PP.getLangOptions());
More information about the cfe-commits
mailing list