aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/DiagnosticOptions.h
blob: 58673e4dad6bb43e385ca487eb3073bcc914d03e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//===--- DiagnosticOptions.h ------------------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_FRONTEND_DIAGNOSTICOPTIONS_H
#define LLVM_CLANG_FRONTEND_DIAGNOSTICOPTIONS_H

#include <string>
#include <vector>

namespace clang {

/// DiagnosticOptions - Options for controlling the compiler diagnostics
/// engine.
class DiagnosticOptions {
public:
  unsigned ShowColumn : 1;       /// Show column number on diagnostics.
  unsigned ShowLocation : 1;     /// Show source location information.
  unsigned ShowCarets : 1;       /// Show carets in diagnostics.
  unsigned ShowFixits : 1;       /// Show fixit information.
  unsigned ShowSourceRanges : 1; /// Show source ranges in numeric form.
  unsigned ShowOptionNames : 1;  /// Show the diagnostic name for mappable
                                 /// diagnostics.
  unsigned ShowColors : 1;       /// Show diagnostics with ANSI color sequences.

  /// Column limit for formatting message diagnostics, or 0 if unused.
  unsigned MessageLength;

public:
  DiagnosticOptions() {
    ShowColumn = 1;
    ShowLocation = 1;
    ShowCarets = 1;
    ShowFixits = 1;
    ShowSourceRanges = 0;
    ShowOptionNames = 0;
    ShowColors = 0;
    MessageLength = 0;
  }
};

}  // end namespace clang

#endif