[PATCH] D17893: Sema: Add semantic analysis for the C++ ABI stability attributes and whitelist.

John McCall via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 18 13:08:14 PDT 2016


rjmccall added inline comments.

================
Comment at: lib/Sema/SemaDeclCXX.cpp:4935-4943
@@ +4934,11 @@
+
+  bool HasStableAttr = Record->hasAttr<StableABIAttr>();
+  bool HasUnstableAttr = Record->hasAttr<UnstableABIAttr>();
+  if (HasStableAttr && HasUnstableAttr) {
+    Diag(Record->getLocation(), diag::err_abi_mismatch) << Record;
+    Diag(Record->getAttr<StableABIAttr>()->getLocation(),
+         diag::note_abi_stability_attr) << /*Unstable=*/false;
+    Diag(Record->getAttr<UnstableABIAttr>()->getLocation(),
+         diag::note_abi_stability_attr) << /*Unstable=*/true;
+  }
+
----------------
No, ms_struct is a request for a specific ABI; this would be a conflict.


http://reviews.llvm.org/D17893





More information about the cfe-commits mailing list