[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:45:23 PST 2024
================
@@ -1419,16 +1412,14 @@ void clang::EmitClangDiagsDefs(const RecordKeeper &Records, raw_ostream &OS,
InferPedantic inferPedantic(DGParentMap, Diags, DiagGroups, DiagsInGroup);
inferPedantic.compute(&DiagsInPedantic, (RecordVec*)nullptr);
- for (unsigned i = 0, e = Diags.size(); i != e; ++i) {
- const Record &R = *Diags[i];
-
+ for (const Record *RP : Diags) {
+ const Record &R = *RP;
----------------
kazutakahirata wrote:
It's not ideal to have both `RP` and `R`. You might want to clean this up in a follow-up patch or something. Not a blocker for this patch.
https://github.com/llvm/llvm-project/pull/115959
More information about the cfe-commits
mailing list