clang API Documentation

AllDiagnostics.h
Go to the documentation of this file.
00001 //===--- AllDiagnostics.h - Aggregate Diagnostic headers --------*- 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 /// \file
00011 /// \brief Includes all the separate Diagnostic headers & some related helpers.
00012 ///
00013 //===----------------------------------------------------------------------===//
00014 
00015 #ifndef LLVM_CLANG_BASIC_ALLDIAGNOSTICS_H
00016 #define LLVM_CLANG_BASIC_ALLDIAGNOSTICS_H
00017 
00018 #include "clang/AST/ASTDiagnostic.h"
00019 #include "clang/AST/CommentDiagnostic.h"
00020 #include "clang/Analysis/AnalysisDiagnostic.h"
00021 #include "clang/Driver/DriverDiagnostic.h"
00022 #include "clang/Frontend/FrontendDiagnostic.h"
00023 #include "clang/Lex/LexDiagnostic.h"
00024 #include "clang/Parse/ParseDiagnostic.h"
00025 #include "clang/Sema/SemaDiagnostic.h"
00026 #include "clang/Serialization/SerializationDiagnostic.h"
00027 
00028 namespace clang {
00029 template <size_t SizeOfStr, typename FieldType>
00030 class StringSizerHelper {
00031   char FIELD_TOO_SMALL[SizeOfStr <= FieldType(~0U) ? 1 : -1];
00032 public:
00033   enum { Size = SizeOfStr };
00034 };
00035 } // end namespace clang 
00036 
00037 #define STR_SIZE(str, fieldTy) clang::StringSizerHelper<sizeof(str)-1, \
00038                                                         fieldTy>::Size 
00039 
00040 #endif