[libcxx-commits] [PATCH] D91565: Guard init_priority attribute within libc++

Aaron Ballman via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Nov 20 10:18:27 PST 2020


aaron.ballman added inline comments.


================
Comment at: clang/test/SemaCXX/init-priority-attr.cpp:26
 Two foo __attribute__((init_priority(101))) ( 5, 6 );
+#if defined(__MVS__)
+ #if defined(SYSTEM)
----------------
Rather than using the preprocessor, you can assign a prefix to be checked to `-verify`. e.g., `-verify=unknown` would allow you to do `// unknown-warning {{unknown attribute 'init_priority' ignored}}` or `unknown-no-diagnostics` that is only checked when `-verify=unknown`.

I wonder if it would be cleaner to use that solution here instead of the preprocessor by adding a new RUN line that's specific to AIX, and setting some non-AIX triples for the other run lines.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91565/new/

https://reviews.llvm.org/D91565



More information about the libcxx-commits mailing list