Skip to content

Commit

Permalink
[clang-tidy] Use StringRef::contains (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Feb 4, 2024
1 parent e7d3a4f commit 92d5f64
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ std::string IdentifierNamingCheck::HungarianNotation::getEnumPrefix(
const auto *ED = cast<EnumDecl>(ECD->getDeclContext());

std::string Name = ED->getName().str();
if (std::string::npos != Name.find("enum")) {
if (StringRef(Name).contains("enum")) {
Name = Name.substr(strlen("enum"), Name.length() - strlen("enum"));
Name = Name.erase(0, Name.find_first_not_of(' '));
}
Expand Down

0 comments on commit 92d5f64

Please sign in to comment.