1 //===--- ASTDiagnostic.h - Diagnostics for the AST library ------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_CLANG_DIAGNOSTICAST_H
11 #define LLVM_CLANG_DIAGNOSTICAST_H
13 #include "clang/Basic/Diagnostic.h"
18 #define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,ACCESS,CATEGORY) ENUM,
20 #include "clang/Basic/DiagnosticASTKinds.inc"
22 NUM_BUILTIN_AST_DIAGNOSTICS
24 } // end namespace diag
26 /// \brief Diagnostic argument formatting function for diagnostics that
27 /// involve AST nodes.
29 /// This function formats diagnostic arguments for various AST nodes,
30 /// including types, declaration names, nested name specifiers, and
31 /// declaration contexts, into strings that can be printed as part of
32 /// diagnostics. It is meant to be used as the argument to
33 /// \c Diagnostic::SetArgToStringFn(), where the cookie is an \c ASTContext
35 void FormatASTNodeDiagnosticArgument(Diagnostic::ArgumentKind Kind,
41 const Diagnostic::ArgumentValue *PrevArgs,
43 llvm::SmallVectorImpl<char> &Output,
45 } // end namespace clang