1203955Srdivacky//===--- ASTDiagnostic.h - Diagnostics for the AST library ------*- C++ -*-===// 2193326Sed// 3193326Sed// The LLVM Compiler Infrastructure 4193326Sed// 5193326Sed// This file is distributed under the University of Illinois Open Source 6193326Sed// License. See LICENSE.TXT for details. 7193326Sed// 8193326Sed//===----------------------------------------------------------------------===// 9193326Sed 10193326Sed#ifndef LLVM_CLANG_DIAGNOSTICAST_H 11193326Sed#define LLVM_CLANG_DIAGNOSTICAST_H 12193326Sed 13193326Sed#include "clang/Basic/Diagnostic.h" 14193326Sed 15193326Sednamespace clang { 16198092Srdivacky namespace diag { 17193326Sed enum { 18221345Sdim#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\ 19263509Sdim SFINAE,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM, 20193326Sed#define ASTSTART 21193326Sed#include "clang/Basic/DiagnosticASTKinds.inc" 22193326Sed#undef DIAG 23193326Sed NUM_BUILTIN_AST_DIAGNOSTICS 24193326Sed }; 25193326Sed } // end namespace diag 26203955Srdivacky 27226890Sdim /// \brief DiagnosticsEngine argument formatting function for diagnostics that 28203955Srdivacky /// involve AST nodes. 29203955Srdivacky /// 30203955Srdivacky /// This function formats diagnostic arguments for various AST nodes, 31203955Srdivacky /// including types, declaration names, nested name specifiers, and 32203955Srdivacky /// declaration contexts, into strings that can be printed as part of 33203955Srdivacky /// diagnostics. It is meant to be used as the argument to 34226890Sdim /// \c DiagnosticsEngine::SetArgToStringFn(), where the cookie is an \c 35226890Sdim /// ASTContext pointer. 36224145Sdim void FormatASTNodeDiagnosticArgument( 37226890Sdim DiagnosticsEngine::ArgumentKind Kind, 38224145Sdim intptr_t Val, 39224145Sdim const char *Modifier, 40224145Sdim unsigned ModLen, 41224145Sdim const char *Argument, 42224145Sdim unsigned ArgLen, 43226890Sdim const DiagnosticsEngine::ArgumentValue *PrevArgs, 44224145Sdim unsigned NumPrevArgs, 45226890Sdim SmallVectorImpl<char> &Output, 46224145Sdim void *Cookie, 47235633Sdim ArrayRef<intptr_t> QualTypeVals); 48193326Sed} // end namespace clang 49193326Sed 50193326Sed#endif 51