Skip to content

Commit de494a6

Browse files
author
git apple-llvm automerger
committed
Merge commit '0e823b02ba8a' from llvm.org/main into next
2 parents 15b08b6 + 0e823b0 commit de494a6

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)