]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/AST/ASTDiagnostic.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / include / clang / AST / ASTDiagnostic.h
1 //===--- ASTDiagnostic.h - Diagnostics for the AST library ------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLVM_CLANG_AST_ASTDIAGNOSTIC_H
11 #define LLVM_CLANG_AST_ASTDIAGNOSTIC_H
12
13 #include "clang/Basic/Diagnostic.h"
14 #include "clang/Basic/DiagnosticAST.h"
15
16 namespace clang {
17   /// DiagnosticsEngine argument formatting function for diagnostics that
18   /// involve AST nodes.
19   ///
20   /// This function formats diagnostic arguments for various AST nodes,
21   /// including types, declaration names, nested name specifiers, and
22   /// declaration contexts, into strings that can be printed as part of
23   /// diagnostics. It is meant to be used as the argument to
24   /// \c DiagnosticsEngine::SetArgToStringFn(), where the cookie is an \c
25   /// ASTContext pointer.
26   void FormatASTNodeDiagnosticArgument(
27       DiagnosticsEngine::ArgumentKind Kind,
28       intptr_t Val,
29       StringRef Modifier,
30       StringRef Argument,
31       ArrayRef<DiagnosticsEngine::ArgumentValue> PrevArgs,
32       SmallVectorImpl<char> &Output,
33       void *Cookie,
34       ArrayRef<intptr_t> QualTypeVals);
35 }  // end namespace clang
36
37 #endif