48 if (Decl->getStorageClass() != SC_Static)
51 const StringRef Name = Decl->getName();
52 std::string NewName = Decl->getName().str();
55 bool AtWordBoundary =
true;
56 while (Index < NewName.size()) {
57 const char Ch = NewName[Index];
61 NewName[Index] = toupper(NewName[Index]);
62 AtWordBoundary =
false;
69 NewName.erase(Index, 1);
70 AtWordBoundary =
true;
76 return FixItHint::CreateReplacement(
77 CharSourceRange::getTokenRange(SourceRange(Decl->getLocation())),
78 llvm::StringRef(NewName));
102 const auto *MatchedDecl = Result.Nodes.getNodeAs<FunctionDecl>(
"function");
104 const bool IsGlobal = MatchedDecl->getStorageClass() != SC_Static;
105 diag(MatchedDecl->getLocation(),
106 "%select{static function|function in global namespace}1 named %0 must "
107 "%select{be in|have an appropriate prefix followed by}1 Pascal case as "
108 "required by Google Objective-C style guide")