================
@@ -6886,6 +6886,13 @@ static void checkAttributesAfterMerging(Sema &S, 
NamedDecl &ND) {
     }
   }
 
+  if (HybridPatchableAttr *Attr = ND.getAttr<HybridPatchableAttr>()) {
+    if (!ND.isExternallyVisible()) {
+      S.Diag(Attr->getLocation(),
+             diag::warn_attribute_hybrid_patchable_non_extern);
+      ND.dropAttr<SelectAnyAttr>();
----------------
cjacek wrote:

Good point, it was a copoy&paste typo. Actually, we don't really need it as 
LLVM part ignores the attribute for static functions itself. I removed that 
line and left only diagnostics part here to slightly simplify the code.

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

Reply via email to