[PATCH] D13925: Implement __attribute__((internal_linkage))

Evgeniy Stepanov via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 20 21:44:25 PDT 2015


eugenis added inline comments.

================
Comment at: lib/Sema/SemaDeclAttr.cpp:1580-1585
@@ -1577,3 +1579,8 @@
+
+  if (InternalLinkageAttr *Internal = D->getAttr<InternalLinkageAttr>()) {
+    S.Diag(Attr.getRange().getBegin(), diag::warn_attribute_ignored)
+        << Attr.getName();
+    S.Diag(Internal->getLocation(), diag::note_conflicting_attribute);
     return;
   }
 
----------------
majnemer wrote:
> Why is this here?  You've already got logic for this in `handleInternalLinkageAttr`
I think because the attributes may appear in different order. See for example the cross-checks between AlwaysInlineAttr and OptimizeNoneAttr. I did not test this.


Repository:
  rL LLVM

http://reviews.llvm.org/D13925





More information about the cfe-commits mailing list