]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/AST/ASTDiagnostic.h
Update dialog to version 1.1-20110302.
[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_DIAGNOSTICAST_H
11 #define LLVM_CLANG_DIAGNOSTICAST_H
12
13 #include "clang/Basic/Diagnostic.h"
14
15 namespace clang {
16   namespace diag {
17     enum {
18 #define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,ACCESS,CATEGORY) ENUM,
19 #define ASTSTART
20 #include "clang/Basic/DiagnosticASTKinds.inc"
21 #undef DIAG
22       NUM_BUILTIN_AST_DIAGNOSTICS
23     };
24   }  // end namespace diag
25   
26   /// \brief Diagnostic argument formatting function for diagnostics that
27   /// involve AST nodes.
28   ///
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
34   /// pointer.
35   void FormatASTNodeDiagnosticArgument(Diagnostic::ArgumentKind Kind, 
36                                        intptr_t Val,
37                                        const char *Modifier, 
38                                        unsigned ModLen,
39                                        const char *Argument, 
40                                        unsigned ArgLen,
41                                       const Diagnostic::ArgumentValue *PrevArgs,
42                                        unsigned NumPrevArgs,
43                                        llvm::SmallVectorImpl<char> &Output,
44                                        void *Cookie);
45 }  // end namespace clang
46
47 #endif