This is an archive of the discontinued LLVM Phabricator instance.

[clang] [HLSL] Fix GCC warnings about virtual methods that are hidden
ClosedPublic

Authored by mstorsjo on Aug 2 2022, 1:03 AM.

Details

Summary

This fixes the following warnings produced by GCC 9:

[...] Building CXX object tools/clan...gSema.dir/HLSLExternalSemaSource.cpp.o
In file included from ../tools/clang/include/clang/Sema/ExternalSemaSource.h:15,

from ../tools/clang/include/clang/Sema/HLSLExternalSemaSource.h:17,
from ../tools/clang/lib/Sema/HLSLExternalSemaSource.cpp:12:

../tools/clang/include/clang/AST/ExternalASTSource.h:211:16: warning: ‘virtual void clang::ExternalASTSource::CompleteType(clang::ObjCInterfaceDecl*)’ was hidden [-Woverloaded-virtual]

211 |   virtual void CompleteType(ObjCInterfaceDecl *Class);
    |                ^~~~~~~~~~~~

In file included from ../tools/clang/lib/Sema/HLSLExternalSemaSource.cpp:12:
../tools/clang/include/clang/Sema/HLSLExternalSemaSource.h:49:8: warning: by virtual void clang::HLSLExternalSemaSource::CompleteType(clang::TagDecl*)’ [-Woverloaded-virtual]

49 |   void CompleteType(TagDecl *Tag) override;
   |        ^~~~~~~~~~~~

Diff Detail

Event Timeline

mstorsjo created this revision.Aug 2 2022, 1:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2022, 1:03 AM
Herald added a subscriber: Anastasia. · View Herald Transcript
mstorsjo requested review of this revision.Aug 2 2022, 1:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2022, 1:03 AM
beanz accepted this revision.Aug 10 2022, 2:50 PM

LGTM. This is a really unfortunate interface that causes this :(.

This revision is now accepted and ready to land.Aug 10 2022, 2:50 PM
This revision was landed with ongoing or failed builds.Aug 11 2022, 12:16 AM
This revision was automatically updated to reflect the committed changes.