Author: Martin Storsjö
Date: 2022-08-11T10:15:13+03:00
New Revision: 5d89f9044392db3838348a3f44e2723e3436dd28

URL: 
https://github.com/llvm/llvm-project/commit/5d89f9044392db3838348a3f44e2723e3436dd28
DIFF: 
https://github.com/llvm/llvm-project/commit/5d89f9044392db3838348a3f44e2723e3436dd28.diff

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

This fixes the following warnings produced by GCC 9:

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;
      |        ^~~~~~~~~~~~

Differential Revision: https://reviews.llvm.org/D130969

Added: 
    

Modified: 
    clang/include/clang/Sema/HLSLExternalSemaSource.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Sema/HLSLExternalSemaSource.h 
b/clang/include/clang/Sema/HLSLExternalSemaSource.h
index a5aa21da1293..0560692f3d5b 100644
--- a/clang/include/clang/Sema/HLSLExternalSemaSource.h
+++ b/clang/include/clang/Sema/HLSLExternalSemaSource.h
@@ -45,6 +45,7 @@ class HLSLExternalSemaSource : public ExternalSemaSource {
   /// Inform the semantic consumer that Sema is no longer available.
   void ForgetSema() override { SemaPtr = nullptr; }
 
+  using ExternalASTSource::CompleteType;
   /// Complete an incomplete HLSL builtin type
   void CompleteType(TagDecl *Tag) override;
 };


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to