[PATCH] D59528: [clang-tidy] Expand modular headers for PPCallbacks

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 2 01:53:50 PDT 2019


uabelho added a comment.

Hi,

I noticed that with this commit I get a whole bunch (~40) of warnings like the below when compiling with gcc 7.4:

  [10/16] Building CXX object tools/clang/tools/extra/clang-tidy/utils/CMakeFiles/clangTidyUtils.dir/HeaderGuard.cpp.o
  In file included from ../tools/clang/tools/extra/clang-tidy/utils/HeaderGuard.h:12:0,
                   from ../tools/clang/tools/extra/clang-tidy/utils/HeaderGuard.cpp:9:
  ../tools/clang/tools/extra/clang-tidy/utils/../ClangTidy.h:161:16: warning: 'virtual void clang::tidy::ClangTidyCheck::registerPPCallbacks(const clang::SourceManager&, clang::Preprocessor*, clang::Preprocessor*)' was hidden [-Woverloaded-virtual]
     virtual void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP,
                  ^~~~~~~~~~~~~~~~~~~
  In file included from ../tools/clang/tools/extra/clang-tidy/utils/HeaderGuard.cpp:9:0:
  ../tools/clang/tools/extra/clang-tidy/utils/HeaderGuard.h:35:8: warning:   by 'virtual void clang::tidy::utils::HeaderGuardCheck::registerPPCallbacks(clang::CompilerInstance&)' [-Woverloaded-virtual]
     void registerPPCallbacks(CompilerInstance &Compiler) override;
          ^~~~~~~~~~~~~~~~~~~

One of the registerPPCallbacks methods has the following comment

  /// DEPRECATED: Use the other overload.
  virtual void registerPPCallbacks(CompilerInstance &Compiler) {}

so I suppose it will be removed at some point?

I'm not super familiar with the warning, but there is at least one discussion about it here:
https://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59528/new/

https://reviews.llvm.org/D59528





More information about the llvm-commits mailing list