diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-04 06:24:30 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-04 06:24:30 +0000 |
commit | eace8743030d2979251a0c5ae247371cfd9056e5 (patch) | |
tree | 31011d67b8d43563a8113536333edbe33a9768b1 /include/clang/Frontend/DiagnosticOptions.h | |
parent | 0360af5d610ba0a65ac46eecf93758fe30457bcd (diff) |
Factor out a diagnostic options class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/DiagnosticOptions.h')
-rw-r--r-- | include/clang/Frontend/DiagnosticOptions.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/include/clang/Frontend/DiagnosticOptions.h b/include/clang/Frontend/DiagnosticOptions.h new file mode 100644 index 0000000000..958a8e9191 --- /dev/null +++ b/include/clang/Frontend/DiagnosticOptions.h @@ -0,0 +1,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 source location information. + 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 |