Author: Nikolas Klauser Date: 2023-12-02T14:04:01+01:00 New Revision: 0e823b02ba8a0f61ddd14bb128cf8e12fe14602a
URL: https://github.com/llvm/llvm-project/commit/0e823b02ba8a0f61ddd14bb128cf8e12fe14602a DIFF: https://github.com/llvm/llvm-project/commit/0e823b02ba8a0f61ddd14bb128cf8e12fe14602a.diff LOG: [libc++] Update libcpp-uglify-attributes to diagnose all attributes in C++03 Added: Modified: libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp Removed: ################################################################################ diff --git a/libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp b/libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp index 5252087d55ee9..7812b236f613c 100644 --- a/libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp +++ b/libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp @@ -44,7 +44,12 @@ bool CPlusPlus23(const T& lang_opts) } std::vector<const char*> get_standard_attributes(const clang::LangOptions& lang_opts) { - std::vector<const char*> attributes = {"noreturn", "carries_dependency"}; + std::vector<const char*> attributes; + + if (lang_opts.CPlusPlus11) { + attributes.emplace_back("noreturn"); + attributes.emplace_back("carries_dependency"); + } if (lang_opts.CPlusPlus14) attributes.emplace_back("deprecated"); _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits