Skip to content

Commit

Permalink
[libc++] Update libcpp-uglify-attributes to diagnose all attributes i…
Browse files Browse the repository at this point in the history
…n C++03
  • Loading branch information
philnik777 committed Dec 2, 2023
1 parent 19e2174 commit 0e823b0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 0e823b0

Please sign in to comment.