[PATCH] D84794: Mark override to a function which overrides a virtual one

Anh Tuyen Tran via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 28 13:14:07 PDT 2020


anhtuyen created this revision.
anhtuyen added reviewers: kbobyrev, bkramer, sammccall, logan-5.
anhtuyen added a project: LLVM.
Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous.
Herald added a project: clang.
anhtuyen requested review of this revision.

Function **void run()** on line 286 overrides a virtual function on line 92.
Not marking it **override**  will cause a build failure when we use -Werror (every warning is treated as an error).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84794

Files:
  clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp


Index: clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
===================================================================
--- clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
+++ clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
@@ -283,7 +283,7 @@
   };
 
 public:
-  void run() {
+  void run() override {
     using namespace clang::clangd;
     // Read input file (as specified in global option)
     auto Buffer = llvm::MemoryBuffer::getFile(IndexLocation);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84794.281335.patch
Type: text/x-patch
Size: 463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200728/df107203/attachment-0001.bin>


More information about the cfe-commits mailing list