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

Peter Collingbourne via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 14 15:47:07 PDT 2016


pcc added a comment.

> Missing some attribute-related tests like attaching the attribute to something other than a record, or passing arguments to the attribute.


Added.


================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8345
@@ +8344,3 @@
+def note_add_unstable_abi_attr : Note<
+  "add attribute clang::unstable_abi or clang::stable_abi to silence this warning">;
+
----------------
aaron.ballman wrote:
> Should this also be a %select, or can you really add either attribute to silence the warning?
The latter. I gave this a better name to make things clear.

================
Comment at: lib/Sema/SemaDeclCXX.cpp:4896
@@ +4895,3 @@
+
+  // No need to do this for non-dynamic classes.
+  if (!Record->isDynamicClass())
----------------
aaron.ballman wrote:
> Since the attributes do nothing for a non-dynamic class, should the user get a warning if the place the attribute on one (so they know it does nothing)?
I suppose so; done.


http://reviews.llvm.org/D17893





More information about the cfe-commits mailing list