================
@@ -710,4 +710,28 @@ void AnnotateIgnoreWritesEnd(const char *file, int line);
 #define LLVM_PREFERRED_TYPE(T)
 #endif
 
+/// \macro LLVM_VIRTUAL_ANCHOR_FUNCTION
+/// This macro is used to adhere to LLVM's policy that each class with a vtable
+/// must have at least one out-of-line virtual function. This macro allows us
+/// to declare such a function in `final` classes without triggering a warning.
+// clang-format off
+// Autoformatting makes this look awful.
+#if defined(__clang__)
+  // Make sure this is only parsed if __clang__ is defined
----------------
nico wrote:

Went with that in 4a44e0014d1b79089d42ef86f0d989053df0cbea. With that, it's 
probably safe to put `defined(__clang__) && 
__has_warning("-Wunnecessary-virtual-specifier")` on one line again.

https://github.com/llvm/llvm-project/pull/141091
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to