We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 65fcb50 commit eb30884Copy full SHA for eb30884
llvm/include/llvm/Support/Compiler.h
@@ -716,11 +716,16 @@ void AnnotateIgnoreWritesEnd(const char *file, int line);
716
/// to declare such a function in `final` classes without triggering a warning.
717
// clang-format off
718
// Autoformatting makes this look awful.
719
+#if defined(__clang__)
720
#define LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION() \
721
_Pragma("clang diagnostic push") \
722
_Pragma("clang diagnostic ignored \"-Wunnecessary-virtual-specifier\"") \
723
virtual void anchor() \
724
_Pragma("clang diagnostic pop")
725
+#else
726
+#define LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION() \
727
+ virtual void anchor()
728
+#endif
729
// clang-format on
730
731
#endif
0 commit comments