[PATCH] D41357: WIP: Fix Diagnostic layering, moving diagnostics out of Basic

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 4 14:17:26 PST 2018


rsmith added a comment.

Yes, I think this is the right general direction -- in general, moving towards making clang's diagnostic infrastructure a reusable component that isn't tied to a particular diagnostics table, and in particular moving the knowledge of the complete set of diagnostics and diagnostic groups out of the diagnostics infrastructure and into the frontend tool.



================
Comment at: tools/driver/cc1_main.cpp:171-261
+static const DiagnosticIDs::DiagInfoRec StaticDiagInfo[] = {
+#define DIAG(ENUM, CLASS, DEFAULT_SEVERITY, DESC, GROUP, SFINAE, NOWERROR,     \
+             SHOWINSYSHEADER, CATEGORY)                                        \
+  {diag::ENUM,                                                                 \
+   DEFAULT_SEVERITY,                                                           \
+   DiagnosticIDs::CLASS,                                                       \
+   DiagnosticIDs::SFINAE,                                                      \
----------------
The best home for this is probably the `FrontendTool` library.


Repository:
  rC Clang

https://reviews.llvm.org/D41357





More information about the cfe-commits mailing list