File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed 
llvm/include/llvm/Support Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -716,11 +716,16 @@ void AnnotateIgnoreWritesEnd(const char *file, int line);
716716// / to declare such a function in `final` classes without triggering a warning.
717717//  clang-format off
718718//  Autoformatting makes this look awful.
719+ #if  defined(__clang__) && __has_warning("-Wunnecessary-virtual-specifier")
719720#define  LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION ()                            \
720721  _Pragma (" clang diagnostic push"  )                                        \
721722  _Pragma(" clang diagnostic ignored \" -Wunnecessary-virtual-specifier\" "  ) \
722723  virtual void anchor()                                                   \
723724  _Pragma(" clang diagnostic pop"  )
725+ #else 
726+ #define  LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION ()                            \
727+   virtual  void  anchor ()
728+ #endif 
724729//  clang-format on
725730
726731#endif
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments