================
@@ -31,6 +33,24 @@ template <typename InputNode>
 using ResolveFnT = std::function<std::vector<const NamedDecl *>(
     const HeuristicResolver *, InputNode)>;
 
+std::string format_error(const clang::StoredDiagnostic &D) {
+  std::ostringstream Msg{};
+  if (D.getLevel() == DiagnosticsEngine::Level::Ignored)
----------------
HighCommander4 wrote:

We don't actually need the first four cases, and I'm not sure the distinction 
between the remaining two (`Error` vs. `Fatal`) is that important; we could 
just skip printing the level?

On the other hand, we could print a short message prefix that provides some 
context, such as "Unexpected error diagnostic while building AST for test 
code:".

https://github.com/llvm/llvm-project/pull/155561
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to