Skip to content

Commit 0e823b0

Browse files
committed
[libc++] Update libcpp-uglify-attributes to diagnose all attributes in C++03
1 parent 19e2174 commit 0e823b0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

libcxx/test/tools/clang_tidy_checks/uglify_attributes.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ bool CPlusPlus23(const T& lang_opts)
4444
}
4545

4646
std::vector<const char*> get_standard_attributes(const clang::LangOptions& lang_opts) {
47-
std::vector<const char*> attributes = {"noreturn", "carries_dependency"};
47+
std::vector<const char*> attributes;
48+
49+
if (lang_opts.CPlusPlus11) {
50+
attributes.emplace_back("noreturn");
51+
attributes.emplace_back("carries_dependency");
52+
}
4853

4954
if (lang_opts.CPlusPlus14)
5055
attributes.emplace_back("deprecated");

0 commit comments

Comments
 (0)