[PATCH] D66875: [Index] Marked a bunch of classes 'final'

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 28 06:30:24 PDT 2019


gribozavr created this revision.
Herald added subscribers: cfe-commits, arphaman.
Herald added a project: clang.
gribozavr added a reviewer: ilya-biryukov.
gribozavr added a child revision: D66876: Indexing: create PP callbacks in the ASTConsumer.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D66875

Files:
  clang/lib/Index/IndexingAction.cpp


Index: clang/lib/Index/IndexingAction.cpp
===================================================================
--- clang/lib/Index/IndexingAction.cpp
+++ clang/lib/Index/IndexingAction.cpp
@@ -23,7 +23,7 @@
 
 namespace {
 
-class IndexASTConsumer : public ASTConsumer {
+class IndexASTConsumer final : public ASTConsumer {
   std::shared_ptr<Preprocessor> PP;
   std::shared_ptr<IndexingContext> IndexCtx;
 
@@ -55,7 +55,7 @@
   }
 };
 
-class IndexPPCallbacks : public PPCallbacks {
+class IndexPPCallbacks final : public PPCallbacks {
   std::shared_ptr<IndexingContext> IndexCtx;
 
 public:
@@ -110,7 +110,7 @@
   }
 };
 
-class IndexAction : public ASTFrontendAction, IndexActionBase {
+class IndexAction final : public ASTFrontendAction, IndexActionBase {
 public:
   IndexAction(std::shared_ptr<IndexDataConsumer> DataConsumer,
               IndexingOptions Opts)
@@ -133,7 +133,7 @@
   }
 };
 
-class WrappingIndexAction : public WrapperFrontendAction, IndexActionBase {
+class WrappingIndexAction final : public WrapperFrontendAction, IndexActionBase {
   bool IndexActionFailed = false;
 
 public:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66875.217622.patch
Type: text/x-patch
Size: 1108 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190828/c2036eaf/attachment.bin>


More information about the cfe-commits mailing list