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);
716
716
// / to declare such a function in `final` classes without triggering a warning.
717
717
// clang-format off
718
718
// Autoformatting makes this look awful.
719
+ #if defined(__clang__) && __has_warning("-Wunnecessary-virtual-specifier")
719
720
#define LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION () \
720
721
_Pragma (" clang diagnostic push" ) \
721
722
_Pragma(" clang diagnostic ignored \" -Wunnecessary-virtual-specifier\" " ) \
722
723
virtual void anchor() \
723
724
_Pragma(" clang diagnostic pop" )
725
+ #else
726
+ #define LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION () \
727
+ virtual void anchor ()
728
+ #endif
724
729
// clang-format on
725
730
726
731
#endif
You can’t perform that action at this time.
0 commit comments