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

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 2 02:14:56 PDT 2019


On Tue, Apr 2, 2019 at 10:53 AM Mikael Holmén via Phabricator <
reviews at reviews.llvm.org> wrote:

> 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?
>

Indeed, the plan is to remove the old overload.


>
> 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
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190402/685ec70d/attachment.html>


More information about the cfe-commits mailing list