[clang] c9b45ce - [clang][NFC] Fix a GCC warning in ASTImporterTest.cpp

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 24 10:02:32 PDT 2020


Usually this would be addressed with a "using Base::Function" - makes it
clear you aren't intending to override any base behavior, just want to
continue to expose the full overload set

On Mon, Aug 24, 2020 at 8:11 AM Raphael Isemann via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

>
> Author: Raphael Isemann
> Date: 2020-08-24T17:10:55+02:00
> New Revision: c9b45ce1fd97531c228e092bedee719b971f82a3
>
> URL:
> https://github.com/llvm/llvm-project/commit/c9b45ce1fd97531c228e092bedee719b971f82a3
> DIFF:
> https://github.com/llvm/llvm-project/commit/c9b45ce1fd97531c228e092bedee719b971f82a3.diff
>
> LOG: [clang][NFC] Fix a GCC warning in ASTImporterTest.cpp
>
> Apparently only overriding one of the two CompleteType overloads causes
> GCC to emit a warning with -Woverloaded-virtual .
>
> Added:
>
>
> Modified:
>     clang/unittests/AST/ASTImporterTest.cpp
>
> Removed:
>
>
>
>
> ################################################################################
> diff  --git a/clang/unittests/AST/ASTImporterTest.cpp
> b/clang/unittests/AST/ASTImporterTest.cpp
> index 9cab6cca0dc4..ecddd4d43752 100644
> --- a/clang/unittests/AST/ASTImporterTest.cpp
> +++ b/clang/unittests/AST/ASTImporterTest.cpp
> @@ -5803,6 +5803,7 @@ struct SourceWithCompletedTagList :
> clang::ExternalASTSource {
>      Record->completeDefinition();
>      CompletedTags.push_back(Tag);
>    }
> +  void CompleteType(ObjCInterfaceDecl *) override {}
>  };
>
>  TEST_P(ImportWithExternalSource, CompleteRecordBeforeImporting) {
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200824/d1eb6870/attachment.html>


More information about the cfe-commits mailing list