zcov: / include/clang/Frontend/DiagnosticOptions.h


Files: 1 Branches Taken: 0.0% 0 / 0
Generated: 2010-02-10 01:31 Branches Executed: 0.0% 0 / 0
Line Coverage: 100.0% 18 / 18


Programs: 7 Runs 9175


       1                 : //===--- DiagnosticOptions.h ------------------------------------*- 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_FRONTEND_DIAGNOSTICOPTIONS_H
      11                 : #define LLVM_CLANG_FRONTEND_DIAGNOSTICOPTIONS_H
      12                 : 
      13                 : #include <string>
      14                 : #include <vector>
      15                 : 
      16                 : namespace clang {
      17                 : 
      18                 : /// DiagnosticOptions - Options for controlling the compiler diagnostics
      19                 : /// engine.
      20             2601: class DiagnosticOptions {
      21                 : public:
      22                 :   unsigned IgnoreWarnings : 1;   /// -w
      23                 :   unsigned NoRewriteMacros : 1;  /// -Wno-rewrite-macros
      24                 :   unsigned Pedantic : 1;         /// -pedantic
      25                 :   unsigned PedanticErrors : 1;   /// -pedantic-errors
      26                 :   unsigned ShowColumn : 1;       /// Show column number on diagnostics.
      27                 :   unsigned ShowLocation : 1;     /// Show source location information.
      28                 :   unsigned ShowCarets : 1;       /// Show carets in diagnostics.
      29                 :   unsigned ShowFixits : 1;       /// Show fixit information.
      30                 :   unsigned ShowSourceRanges : 1; /// Show source ranges in numeric form.
      31                 :   unsigned ShowOptionNames : 1;  /// Show the diagnostic name for mappable
      32                 :                                  /// diagnostics.
      33                 :   unsigned ShowColors : 1;       /// Show diagnostics with ANSI color sequences.
      34                 :   unsigned VerifyDiagnostics: 1; /// Check that diagnostics match the expected
      35                 :                                  /// diagnostics, indicated by markers in the
      36                 :                                  /// input source file.
      37                 :   unsigned BinaryOutput : 1;     /// Emit diagnostics via the diagnostic 
      38                 :                                  /// binary serialization mechanism, to be
      39                 :                                  /// deserialized by, e.g., the CIndex library.
      40                 : 
      41                 :   /// The distance between tab stops.
      42                 :   unsigned TabStop;
      43                 :   enum { DefaultTabStop = 8, MaxTabStop = 100 };
      44                 : 
      45                 :   /// Column limit for formatting message diagnostics, or 0 if unused.
      46                 :   unsigned MessageLength;
      47                 : 
      48                 :   /// If non-empty, a file to log extended build information to, for development
      49                 :   /// testing and analysis.
      50                 :   std::string DumpBuildInformation;
      51                 : 
      52                 :   /// The list of -W... options used to alter the diagnostic mappings, with the
      53                 :   /// prefixes removed.
      54                 :   std::vector<std::string> Warnings;
      55                 : 
      56                 : public:
      57             2601:   DiagnosticOptions() {
      58             2601:     IgnoreWarnings = 0;
      59             2601:     TabStop = DefaultTabStop;
      60             2601:     MessageLength = 0;
      61             2601:     NoRewriteMacros = 0;
      62             2601:     Pedantic = 0;
      63             2601:     PedanticErrors = 0;
      64             2601:     ShowCarets = 1;
      65             2601:     ShowColors = 0;
      66             2601:     ShowColumn = 1;
      67             2601:     ShowFixits = 1;
      68             2601:     ShowLocation = 1;
      69             2601:     ShowOptionNames = 0;
      70             2601:     ShowSourceRanges = 0;
      71             2601:     VerifyDiagnostics = 0;
      72             2601:     BinaryOutput = 0;
      73             2601:   }
      74                 : };
      75                 : 
      76                 : }  // end namespace clang
      77                 : 
      78                 : #endif

Generated: 2010-02-10 01:31 by zcov