| 1 | //===--- ASTDiagnostic.h - Diagnostics for the AST library ------*- C++ -*-===// |
|---|---|
| 2 | // |
| 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 |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef LLVM_CLANG_AST_ASTDIAGNOSTIC_H |
| 10 | #define LLVM_CLANG_AST_ASTDIAGNOSTIC_H |
| 11 | |
| 12 | #include "clang/Basic/Diagnostic.h" |
| 13 | #include "clang/Basic/DiagnosticAST.h" |
| 14 | |
| 15 | namespace clang { |
| 16 | /// DiagnosticsEngine argument formatting function for diagnostics that |
| 17 | /// involve AST nodes. |
| 18 | /// |
| 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, |
| 27 | intptr_t Val, |
| 28 | StringRef Modifier, |
| 29 | StringRef Argument, |
| 30 | ArrayRef<DiagnosticsEngine::ArgumentValue> PrevArgs, |
| 31 | SmallVectorImpl<char> &Output, |
| 32 | void *Cookie, |
| 33 | ArrayRef<intptr_t> QualTypeVals); |
| 34 | } // end namespace clang |
| 35 | |
| 36 | #endif |
| 37 |