r370321 - [Index] Marked a bunch of classes 'final'

Dmitri Gribenko via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 29 03:16:41 PDT 2019


Author: gribozavr
Date: Thu Aug 29 03:16:41 2019
New Revision: 370321

URL: http://llvm.org/viewvc/llvm-project?rev=370321&view=rev
Log:
[Index] Marked a bunch of classes 'final'

This file defines multiple inheritance hierarchies and 'final' helps
with readability.

Modified:
    cfe/trunk/lib/Index/IndexingAction.cpp

Modified: cfe/trunk/lib/Index/IndexingAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/IndexingAction.cpp?rev=370321&r1=370320&r2=370321&view=diff
==============================================================================
--- cfe/trunk/lib/Index/IndexingAction.cpp (original)
+++ cfe/trunk/lib/Index/IndexingAction.cpp Thu Aug 29 03:16:41 2019
@@ -23,7 +23,7 @@ using namespace clang::index;
 
 namespace {
 
-class IndexASTConsumer : public ASTConsumer {
+class IndexASTConsumer final : public ASTConsumer {
   std::shared_ptr<Preprocessor> PP;
   std::shared_ptr<IndexingContext> IndexCtx;
 
@@ -55,7 +55,7 @@ protected:
   }
 };
 
-class IndexPPCallbacks : public PPCallbacks {
+class IndexPPCallbacks final : public PPCallbacks {
   std::shared_ptr<IndexingContext> IndexCtx;
 
 public:
@@ -110,7 +110,7 @@ protected:
   }
 };
 
-class IndexAction : public ASTFrontendAction, IndexActionBase {
+class IndexAction final : public ASTFrontendAction, IndexActionBase {
 public:
   IndexAction(std::shared_ptr<IndexDataConsumer> DataConsumer,
               IndexingOptions Opts)
@@ -133,7 +133,7 @@ protected:
   }
 };
 
-class WrappingIndexAction : public WrapperFrontendAction, IndexActionBase {
+class WrappingIndexAction final : public WrapperFrontendAction, IndexActionBase {
   bool IndexActionFailed = false;
 
 public:




More information about the cfe-commits mailing list