[clang] [NFC][Clang] Use StringRef instead of string in ClangDiagnosticEmitter (PR #115959)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 13 09:43:04 PST 2024
================
@@ -117,15 +118,15 @@ namespace {
return CategoryIDs[CategoryString];
}
- typedef std::vector<std::string>::const_iterator const_iterator;
+ typedef std::vector<StringRef>::const_iterator const_iterator;
const_iterator begin() const { return CategoryStrings.begin(); }
const_iterator end() const { return CategoryStrings.end(); }
};
struct GroupInfo {
StringRef GroupName;
std::vector<const Record*> DiagsInGroup;
- std::vector<std::string> SubGroups;
+ std::vector<StringRef> SubGroups;
----------------
kazutakahirata wrote:
Thanks for the pointer and explanation!
https://github.com/llvm/llvm-project/pull/115959
More information about the cfe-commits
mailing list