clang API Documentation
00001 //===--- ASTDiagnostic.h - Diagnostics for the AST library ------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 00010 #ifndef LLVM_CLANG_AST_ASTDIAGNOSTIC_H 00011 #define LLVM_CLANG_AST_ASTDIAGNOSTIC_H 00012 00013 #include "clang/Basic/Diagnostic.h" 00014 00015 namespace clang { 00016 namespace diag { 00017 enum { 00018 #define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\ 00019 SFINAE,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM, 00020 #define ASTSTART 00021 #include "clang/Basic/DiagnosticASTKinds.inc" 00022 #undef DIAG 00023 NUM_BUILTIN_AST_DIAGNOSTICS 00024 }; 00025 } // end namespace diag 00026 00027 /// \brief DiagnosticsEngine argument formatting function for diagnostics that 00028 /// involve AST nodes. 00029 /// 00030 /// This function formats diagnostic arguments for various AST nodes, 00031 /// including types, declaration names, nested name specifiers, and 00032 /// declaration contexts, into strings that can be printed as part of 00033 /// diagnostics. It is meant to be used as the argument to 00034 /// \c DiagnosticsEngine::SetArgToStringFn(), where the cookie is an \c 00035 /// ASTContext pointer. 00036 void FormatASTNodeDiagnosticArgument( 00037 DiagnosticsEngine::ArgumentKind Kind, 00038 intptr_t Val, 00039 StringRef Modifier, 00040 StringRef Argument, 00041 ArrayRef<DiagnosticsEngine::ArgumentValue> PrevArgs, 00042 SmallVectorImpl<char> &Output, 00043 void *Cookie, 00044 ArrayRef<intptr_t> QualTypeVals); 00045 } // end namespace clang 00046 00047 #endif