[cfe-commits] r86825 - /cfe/trunk/tools/clang-cc/clang-cc.cpp
Daniel Dunbar
daniel at zuster.org
Wed Nov 11 01:38:42 PST 2009
Author: ddunbar
Date: Wed Nov 11 03:38:42 2009
New Revision: 86825
URL: http://llvm.org/viewvc/llvm-project?rev=86825&view=rev
Log:
Minor formatting tweaks.
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=86825&r1=86824&r2=86825&view=diff
==============================================================================
--- cfe/trunk/tools/clang-cc/clang-cc.cpp (original)
+++ cfe/trunk/tools/clang-cc/clang-cc.cpp Wed Nov 11 03:38:42 2009
@@ -563,11 +563,11 @@
return Ret;
}
-/// AddFixitLocations - Add any individual user specified "fix-it" locations,
+/// AddFixItLocations - Add any individual user specified "fix-it" locations,
/// and return true on success (if any were added).
-static bool AddFixitLocations(FixItRewriter *FixItRewrite,
+static bool AddFixItLocations(FixItRewriter *FixItRewrite,
FileManager &FileMgr) {
- bool AddedFixitLocation = false;
+ bool AddedFixItLocation = false;
for (unsigned i = 0, e = FixItAtLocations.size(); i != e; ++i) {
if (const FileEntry *File = FileMgr.getFile(FixItAtLocations[i].FileName)) {
@@ -576,14 +576,14 @@
Requested.Line = FixItAtLocations[i].Line;
Requested.Column = FixItAtLocations[i].Column;
FixItRewrite->addFixItLocation(Requested);
- AddedFixitLocation = true;
+ AddedFixItLocation = true;
} else {
llvm::errs() << "FIX-IT could not find file \""
<< FixItAtLocations[i].FileName << "\"\n";
}
}
- return AddedFixitLocation;
+ return AddedFixItLocation;
}
static ASTConsumer *CreateConsumerAction(const CompilerInvocation &CompOpts,
@@ -674,13 +674,11 @@
default:
Consumer.reset(CreateConsumerAction(CompOpts, PP, InFile, PA, OS, OutPath,
Context));
-
if (!Consumer.get()) {
PP.getDiagnostics().Report(diag::err_fe_invalid_ast_action);
return;
}
-
- break;;
+ break;
case EmitHTML:
OS.reset(ComputeOutFile(CompOpts, InFile, 0, true, OutPath));
@@ -800,14 +798,14 @@
FixItRewrite = new FixItRewriter(PP.getDiagnostics(),
PP.getSourceManager(),
PP.getLangOptions());
-
- if (!AddFixitLocations(FixItRewrite, PP.getFileManager())) {
+ if (!AddFixItLocations(FixItRewrite, PP.getFileManager())) {
// All of the fix-it locations were bad. Don't fix anything.
delete FixItRewrite;
FixItRewrite = 0;
}
}
+
llvm::OwningPtr<ASTContext> ContextOwner;
if (Consumer)
ContextOwner.reset(new ASTContext(PP.getLangOptions(),
More information about the cfe-commits
mailing list