From: Edwin Vane Date: Thu, 30 May 2013 13:59:44 +0000 (+0000) Subject: Coding style fix for SourceFileCallbacks X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5ec9580f68661ffccff07177613b692d0acb4797;p=clang Coding style fix for SourceFileCallbacks git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182930 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Tooling/Tooling.h b/include/clang/Tooling/Tooling.h index b446c94cb0..7de0a1fe2a 100644 --- a/include/clang/Tooling/Tooling.h +++ b/include/clang/Tooling/Tooling.h @@ -83,13 +83,13 @@ public: /// \brief Called before a source file is processed by a FrontEndAction. /// \see clang::FrontendAction::BeginSourceFileAction - virtual bool BeginSource(CompilerInstance &CI, StringRef Filename) { + virtual bool handleBeginSource(CompilerInstance &CI, StringRef Filename) { return true; } /// \brief Called after a source file is processed by a FrontendAction. /// \see clang::FrontendAction::EndSourceFileAction - virtual void EndSource() {} + virtual void handleEndSource() {} }; /// \brief Returns a new FrontendActionFactory for any type that provides an @@ -265,12 +265,12 @@ inline FrontendActionFactory *newFrontendActionFactory( if (!clang::ASTFrontendAction::BeginSourceFileAction(CI, Filename)) return false; if (Callbacks != NULL) - return Callbacks->BeginSource(CI, Filename); + return Callbacks->handleBeginSource(CI, Filename); return true; } virtual void EndSourceFileAction() LLVM_OVERRIDE { if (Callbacks != NULL) - Callbacks->EndSource(); + Callbacks->handleEndSource(); clang::ASTFrontendAction::EndSourceFileAction(); } diff --git a/unittests/Tooling/ToolingTest.cpp b/unittests/Tooling/ToolingTest.cpp index a7b9431918..d96366dcd5 100644 --- a/unittests/Tooling/ToolingTest.cpp +++ b/unittests/Tooling/ToolingTest.cpp @@ -133,12 +133,12 @@ TEST(ToolInvocation, TestMapVirtualFile) { struct VerifyEndCallback : public SourceFileCallbacks { VerifyEndCallback() : BeginCalled(0), EndCalled(0), Matched(false) {} - virtual bool BeginSource(CompilerInstance &CI, - StringRef Filename) LLVM_OVERRIDE { + virtual bool handleBeginSource(CompilerInstance &CI, + StringRef Filename) LLVM_OVERRIDE { ++BeginCalled; return true; } - virtual void EndSource() { + virtual void handleEndSource() { ++EndCalled; } ASTConsumer *newASTConsumer() {