[libcxx-commits] [PATCH] D142332: [libc++] Add hide_from_abi check for classes
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 14 10:55:10 PDT 2023
Mordante accepted this revision.
Mordante added a comment.
This revision is now accepted and ready to land.
LGTM modulo some nits.
================
Comment at: libcxx/test/tools/clang_tidy_checks/hide_from_abi.cpp:92
+
+ // The rest gets ignored in C++03 because it is subtly different in some cases.
+ if (!result.Context->getLangOpts().CPlusPlus11)
----------------
Could you add an example in the comment.
================
Comment at: libcxx/test/tools/clang_tidy_checks/hide_from_abi.cpp:98
+ call != nullptr) {
+ diag(call->getLocation(), "_LIBCPP_HIDE_FROM_ABI or _LIBCPP_HIDE_FROM_ABI_VIRTUAL is missing");
+ }
----------------
How about testing whether the method is virtual and show the proper message. This can probabl be done with a '%select' in the diagnotic message.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142332/new/
https://reviews.llvm.org/D142332
More information about the libcxx-commits
mailing list