[PATCH] D46740: [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` messages.

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 18 16:20:50 PDT 2018


rjmccall added inline comments.


================
Comment at: utils/TableGen/ClangDiagnosticsEmitter.cpp:514
+  std::vector<Record *> Diags = Records.getAllDerivedDefinitions("Diagnostic");
+  llvm::for_each(Diags, [&](Record *R) { substituteDiagText(R, SubsMap); });
 
----------------
EricWF wrote:
> rjmccall wrote:
> > I see why this has to be done separately, I think, but it should at least go in a helper function.
> > 
> > Also, please check for substitution-name conflicts.
> @rjmccall By substitution name conflicts do you mean substitution names which conflict with diagnostic names?
I meant between substitutions, but I guess that's probably handled automatically by the base TableGen parser, sorry.


https://reviews.llvm.org/D46740





More information about the cfe-commits mailing list