1 //===--- ASTDiagnostic.h - Diagnostics for the AST library ------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_AST_ASTDIAGNOSTIC_H
10 #define LLVM_CLANG_AST_ASTDIAGNOSTIC_H
12 #include "clang/Basic/Diagnostic.h"
13 #include "clang/Basic/DiagnosticAST.h"
16 /// DiagnosticsEngine argument formatting function for diagnostics that
17 /// involve AST nodes.
19 /// This function formats diagnostic arguments for various AST nodes,
20 /// including types, declaration names, nested name specifiers, and
21 /// declaration contexts, into strings that can be printed as part of
22 /// diagnostics. It is meant to be used as the argument to
23 /// \c DiagnosticsEngine::SetArgToStringFn(), where the cookie is an \c
24 /// ASTContext pointer.
25 void FormatASTNodeDiagnosticArgument(
26 DiagnosticsEngine::ArgumentKind Kind,
30 ArrayRef<DiagnosticsEngine::ArgumentValue> PrevArgs,
31 SmallVectorImpl<char> &Output,
33 ArrayRef<intptr_t> QualTypeVals);
34 } // end namespace clang