Skip to content

Commit edbdb56

Browse files
authored
merge main into amd-staging (llvm#3918)
2 parents 6bbc95a + 82935ee commit edbdb56

File tree

110 files changed

+1601
-1321
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+1601
-1321
lines changed

clang-tools-extra/clang-tidy/ClangTidyCheck.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ ClangTidyCheck::OptionsView::get(StringRef LocalName) const {
6262
return std::nullopt;
6363
}
6464

65-
static const llvm::StringSet<> DeprecatedGlobalOptions{
66-
"StrictMode",
67-
"IgnoreMacros",
68-
};
69-
7065
static ClangTidyOptions::OptionMap::const_iterator
7166
findPriorityOption(const ClangTidyOptions::OptionMap &Options,
7267
StringRef NamePrefix, StringRef LocalName,
@@ -78,13 +73,6 @@ findPriorityOption(const ClangTidyOptions::OptionMap &Options,
7873
}
7974
auto IterLocal = Options.find((NamePrefix + LocalName).str());
8075
auto IterGlobal = Options.find(LocalName);
81-
// FIXME: temporary solution for deprecation warnings, should be removed
82-
// after 22.x. Warn configuration deps on deprecation global options.
83-
if (IterLocal == Options.end() && IterGlobal != Options.end() &&
84-
DeprecatedGlobalOptions.contains(LocalName))
85-
Context->configurationDiag(
86-
"global option '%0' is deprecated, please use '%1%0' instead.")
87-
<< LocalName << NamePrefix;
8876
if (IterLocal == Options.end())
8977
return IterGlobal;
9078
if (IterGlobal == Options.end())

clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ AST_MATCHER(Decl, isFromStdNamespaceOrSystemHeader) {
3232
ArgumentCommentCheck::ArgumentCommentCheck(StringRef Name,
3333
ClangTidyContext *Context)
3434
: ClangTidyCheck(Name, Context),
35-
StrictMode(Options.getLocalOrGlobal("StrictMode", false)),
35+
StrictMode(Options.get("StrictMode", false)),
3636
IgnoreSingleArgument(Options.get("IgnoreSingleArgument", false)),
3737
CommentBoolLiterals(Options.get("CommentBoolLiterals", false)),
3838
CommentIntegerLiterals(Options.get("CommentIntegerLiterals", false)),

clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ AST_MATCHER(CXXMethodDecl, isInLambda) { return Node.getParent()->isLambda(); }
6464
LambdaFunctionNameCheck::LambdaFunctionNameCheck(StringRef Name,
6565
ClangTidyContext *Context)
6666
: ClangTidyCheck(Name, Context),
67-
IgnoreMacros(
68-
Options.getLocalOrGlobal("IgnoreMacros", DefaultIgnoreMacros)) {}
67+
IgnoreMacros(Options.get("IgnoreMacros", DefaultIgnoreMacros)) {}
6968

7069
void LambdaFunctionNameCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
7170
Options.store(Opts, "IgnoreMacros", IgnoreMacros);

clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static bool isPossiblyBitMask(const EnumDecl *EnumDec) {
106106
SuspiciousEnumUsageCheck::SuspiciousEnumUsageCheck(StringRef Name,
107107
ClangTidyContext *Context)
108108
: ClangTidyCheck(Name, Context),
109-
StrictMode(Options.getLocalOrGlobal("StrictMode", false)) {}
109+
StrictMode(Options.get("StrictMode", false)) {}
110110

111111
void SuspiciousEnumUsageCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
112112
Options.store(Opts, "StrictMode", StrictMode);

clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidDoWhileCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace clang::tidy::cppcoreguidelines {
1515

1616
AvoidDoWhileCheck::AvoidDoWhileCheck(StringRef Name, ClangTidyContext *Context)
1717
: ClangTidyCheck(Name, Context),
18-
IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", false)) {}
18+
IgnoreMacros(Options.get("IgnoreMacros", false)) {}
1919

2020
void AvoidDoWhileCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
2121
Options.store(Opts, "IgnoreMacros", IgnoreMacros);

clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static bool hasVolatileQualifier(QualType Type) {
3232
ProTypeConstCastCheck::ProTypeConstCastCheck(StringRef Name,
3333
ClangTidyContext *Context)
3434
: ClangTidyCheck(Name, Context),
35-
StrictMode(Options.getLocalOrGlobal("StrictMode", false)) {}
35+
StrictMode(Options.get("StrictMode", false)) {}
3636

3737
void ProTypeConstCastCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
3838
Options.store(Opts, "StrictMode", StrictMode);

clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace clang::tidy::cppcoreguidelines {
1717
ProTypeStaticCastDowncastCheck::ProTypeStaticCastDowncastCheck(
1818
StringRef Name, ClangTidyContext *Context)
1919
: ClangTidyCheck(Name, Context),
20-
StrictMode(Options.getLocalOrGlobal("StrictMode", true)) {}
20+
StrictMode(Options.get("StrictMode", true)) {}
2121

2222
void ProTypeStaticCastDowncastCheck::storeOptions(
2323
ClangTidyOptions::OptionMap &Opts) {

clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ UnusedParametersCheck::~UnusedParametersCheck() = default;
136136
UnusedParametersCheck::UnusedParametersCheck(StringRef Name,
137137
ClangTidyContext *Context)
138138
: ClangTidyCheck(Name, Context),
139-
StrictMode(Options.getLocalOrGlobal("StrictMode", false)),
139+
StrictMode(Options.get("StrictMode", false)),
140140
IgnoreVirtual(Options.get("IgnoreVirtual", false)) {}
141141

142142
void UnusedParametersCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {

clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ MakeSmartPtrCheck::MakeSmartPtrCheck(StringRef Name, ClangTidyContext *Context,
4646
Options.get("MakeSmartPtrFunctionHeader", "<memory>")),
4747
MakeSmartPtrFunctionName(
4848
Options.get("MakeSmartPtrFunction", MakeSmartPtrFunctionName)),
49-
IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", true)),
49+
IgnoreMacros(Options.get("IgnoreMacros", true)),
5050
IgnoreDefaultInitialization(
5151
Options.get("IgnoreDefaultInitialization", true)) {}
5252

clang-tools-extra/clang-tidy/modernize/TypeTraitsCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static bool checkTemplatedDecl(NestedNameSpecifier NNS,
220220

221221
TypeTraitsCheck::TypeTraitsCheck(StringRef Name, ClangTidyContext *Context)
222222
: ClangTidyCheck(Name, Context),
223-
IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", false)) {}
223+
IgnoreMacros(Options.get("IgnoreMacros", false)) {}
224224

225225
void TypeTraitsCheck::check(const MatchFinder::MatchResult &Result) {
226226
auto EmitValueWarning = [this, &Result](const NestedNameSpecifierLoc &QualLoc,

0 commit comments

Comments
 (0)