diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-11 09:38:42 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-11 09:38:42 +0000 |
commit | dc8bbac2f8b78ddef100ae8115fd5a776d1b564c (patch) | |
tree | d922d55aa9594fa1eb9c618623dd8afcd5ff4e98 | |
parent | bd9f04b68bc7001ee874360f0187acc12719f84e (diff) |
Minor formatting tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86825 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/clang-cc/clang-cc.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/tools/clang-cc/clang-cc.cpp b/tools/clang-cc/clang-cc.cpp index b9edc0cacd..2a40656292 100644 --- a/tools/clang-cc/clang-cc.cpp +++ b/tools/clang-cc/clang-cc.cpp @@ -563,11 +563,11 @@ static llvm::raw_ostream *ComputeOutFile(const CompilerInvocation &CompOpts, 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 @@ static bool AddFixitLocations(FixItRewriter *FixItRewrite, 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 @@ static void ProcessInputFile(const CompilerInvocation &CompOpts, 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 @@ static void ProcessInputFile(const CompilerInvocation &CompOpts, 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(), |