We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c31984 commit a438555Copy full SHA for a438555
clang/utils/TableGen/ClangOptionDocEmitter.cpp
@@ -205,10 +205,7 @@ std::string escapeRST(StringRef Str) {
205
}
206
207
StringRef getSphinxOptionID(StringRef OptionName) {
208
- for (auto I = OptionName.begin(), E = OptionName.end(); I != E; ++I)
209
- if (!isalnum(*I) && *I != '-')
210
- return OptionName.substr(0, I - OptionName.begin());
211
- return OptionName;
+ return OptionName.take_while([](char C) { return isalnum(C) || C == '-'; });
212
213
214
bool canSphinxCopeWithOption(const Record *Option) {
0 commit comments