Skip to content

Commit 6269877

Browse files
committed
CLI -> Cli
1 parent 5361740 commit 6269877

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

flang/include/flang/Support/Fortran-features.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -115,36 +115,36 @@ class LanguageFeatureControl {
115115
bool IsEnabled(LanguageFeature f) const { return !disable_.test(f); }
116116
bool ShouldWarn(LanguageFeature f) const { return warnLanguage_.test(f); }
117117
bool ShouldWarn(UsageWarning w) const { return warnUsage_.test(w); }
118-
// CLI options
119-
bool ApplyCLIOption(std::string input);
120-
void AddAlternativeCLISpelling(LanguageFeature f, std::string input) {
118+
// Cli options
119+
bool ApplyCliOption(std::string input);
120+
void AddAlternativeCliSpelling(LanguageFeature f, std::string input) {
121121
cliOptions_.insert({input, {f}});
122122
}
123-
void AddAlternativeCLISpelling(UsageWarning w, std::string input) {
123+
void AddAlternativeCliSpelling(UsageWarning w, std::string input) {
124124
cliOptions_.insert({input, {w}});
125125
}
126-
void ReplaceCLICanonicalSpelling(LanguageFeature f, std::string input);
127-
void ReplaceCLICanonicalSpelling(UsageWarning w, std::string input);
128-
std::string_view getDefaultCLISpelling(LanguageFeature f) const {
129-
return languageFeatureCLICanonicalSpelling_[EnumToInt(f)];
126+
void ReplaceCliCanonicalSpelling(LanguageFeature f, std::string input);
127+
void ReplaceCliCanonicalSpelling(UsageWarning w, std::string input);
128+
std::string_view getDefaultCliSpelling(LanguageFeature f) const {
129+
return languageFeatureCliCanonicalSpelling_[EnumToInt(f)];
130130
};
131-
std::string_view getDefaultCLISpelling(UsageWarning w) const {
132-
return usageWarningCLICanonicalSpelling_[EnumToInt(w)];
131+
std::string_view getDefaultCliSpelling(UsageWarning w) const {
132+
return usageWarningCliCanonicalSpelling_[EnumToInt(w)];
133133
};
134134
// Return all spellings of operators names, depending on features enabled
135135
std::vector<const char *> GetNames(LogicalOperator) const;
136136
std::vector<const char *> GetNames(RelationalOperator) const;
137137

138138
private:
139-
// Map from CLI syntax of language features and usage warnings to their enum
139+
// Map from Cli syntax of language features and usage warnings to their enum
140140
// values.
141141
std::unordered_map<std::string, std::variant<LanguageFeature, UsageWarning>>
142142
cliOptions_;
143-
// These two arrays map the enum values to their cannonical CLI spellings.
143+
// These two arrays map the enum values to their cannonical Cli spellings.
144144
std::array<std::string_view, LanguageFeature_enumSize>
145-
languageFeatureCLICanonicalSpelling_;
145+
languageFeatureCliCanonicalSpelling_;
146146
std::array<std::string_view, UsageWarning_enumSize>
147-
usageWarningCLICanonicalSpelling_;
147+
usageWarningCliCanonicalSpelling_;
148148
LanguageFeatures disable_;
149149
LanguageFeatures warnLanguage_;
150150
bool warnAllLanguage_{false};

flang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ static bool parseDiagArgs(CompilerInvocation &res, llvm::opt::ArgList &args,
10091009
if (wArg == "error") {
10101010
res.setWarnAsErr(true);
10111011
// -W(no-)<feature>
1012-
} else if (!features.ApplyCLIOption(wArg)) {
1012+
} else if (!features.ApplyCliOption(wArg)) {
10131013
const unsigned diagID = diags.getCustomDiagID(
10141014
clang::DiagnosticsEngine::Error, "Unknown diagnostic option: -W%0");
10151015
diags.Report(diagID) << wArg;

flang/lib/Support/Fortran-features.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static std::vector<std::string_view> SplitCamelCase(std::string_view x) {
3535
return result;
3636
}
3737

38-
// Namespace for helper functions for parsing CLI options used instead of static
38+
// Namespace for helper functions for parsing Cli options used instead of static
3939
// so that there can be unit tests for this function.
4040
namespace featuresHelpers {
4141
std::string CamelCaseToLowerCaseHyphenated(std::string_view x) {
@@ -154,15 +154,15 @@ LanguageFeatureControl::LanguageFeatureControl() {
154154
warnLanguage_.set(LanguageFeature::NullActualForAllocatable);
155155
}
156156

157-
// Take a string from the CLI and apply it to the LanguageFeatureControl.
157+
// Take a string from the Cli and apply it to the LanguageFeatureControl.
158158
// Return true if the option was applied recognized.
159-
bool LanguageFeatureControl::ApplyCLIOption(std::string input) {
159+
bool LanguageFeatureControl::ApplyCliOption(std::string input) {
160160
bool negated{false};
161161
if (input.size() > 3 && input.substr(0, 3) == "no-") {
162162
negated = true;
163163
input = input.substr(3);
164164
}
165-
if (auto it{cliOptions_.find(input)}; it != cliOptions_.end()) {
165+
if (auto it {cliOptions_.find(input)}; it != cliOptions_.end()) {
166166
if (std::holds_alternative<LanguageFeature>(it->second)) {
167167
EnableWarning(std::get<LanguageFeature>(it->second), !negated);
168168
return true;
@@ -175,15 +175,15 @@ bool LanguageFeatureControl::ApplyCLIOption(std::string input) {
175175
return false;
176176
}
177177

178-
void LanguageFeatureControl::ReplaceCLICanonicalSpelling(
178+
void LanguageFeatureControl::ReplaceCliCanonicalSpelling(
179179
LanguageFeature f, std::string input) {
180180
std::string_view old{languageFeatureCliCanonicalSpelling_[EnumToInt(f)]};
181181
cliOptions_.erase(std::string{old});
182182
languageFeatureCliCanonicalSpelling_[EnumToInt(f)] = input;
183183
cliOptions_.insert({input, {f}});
184184
}
185185

186-
void LanguageFeatureControl::ReplaceCLICanonicalSpelling(
186+
void LanguageFeatureControl::ReplaceCliCanonicalSpelling(
187187
UsageWarning w, std::string input) {
188188
std::string_view old{usageWarningCliCanonicalSpelling_[EnumToInt(w)]};
189189
cliOptions_.erase(std::string{old});

0 commit comments

Comments
 (0)