clang: include/clang/Basic/DiagnosticOptions.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_CLANG_BASIC_DIAGNOSTICOPTIONS_H

10#define LLVM_CLANG_BASIC_DIAGNOSTICOPTIONS_H

11

13#include

14#include <type_traits>

15#include

16

17namespace llvm {

21}

22

24class DiagnosticsEngine;

25

26

27

35

36

37

46

48 using UT = std::underlying_type_t;

50}

51

54 using UT = std::underlying_type_t;

56 static_cast<UT>(LHS) | static_cast<UT>(RHS));

57}

58

61 using UT = std::underlying_type_t;

63 static_cast<UT>(LHS) & static_cast<UT>(RHS));

64}

65

67

68

72

75

76public:

78

79

80 enum {

89 };

90

91

92#define DIAGOPT(Name, Bits, Default) unsigned Name : Bits;

93#define ENUM_DIAGOPT(Name, Type, Bits, Default)

94#include "clang/Basic/DiagnosticOptions.def"

95

96protected:

97

98

99#define DIAGOPT(Name, Bits, Default)

100#define ENUM_DIAGOPT(Name, Type, Bits, Default) unsigned Name : Bits;

101#include "clang/Basic/DiagnosticOptions.def"

102

103public:

104

106

107

109

110

112

113

114

116

117

118

120

121

122

124

125

126

128

129

130

132

133public:

134

135#define DIAGOPT(Name, Bits, Default)

136#define ENUM_DIAGOPT(Name, Type, Bits, Default) \

137 Type get##Name() const { return static_cast(Name); } \

138 void set##Name(Type Value) { Name = static_cast(Value); }

139#include "clang/Basic/DiagnosticOptions.def"

140

142#define DIAGOPT(Name, Bits, Default) Name = Default;

143#define ENUM_DIAGOPT(Name, Type, Bits, Default) set##Name(Default);

144#include "clang/Basic/DiagnosticOptions.def"

145 }

146};

147

149

150}

151

152#endif

Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.

@ DefaultSpellCheckingLimit

Definition DiagnosticOptions.h:86

@ DefaultConstexprBacktraceLimit

Definition DiagnosticOptions.h:85

@ DefaultTabStop

Definition DiagnosticOptions.h:81

@ DefaultShowLineNumbers

Definition DiagnosticOptions.h:88

@ MaxTabStop

Definition DiagnosticOptions.h:82

@ DefaultTemplateBacktraceLimit

Definition DiagnosticOptions.h:84

@ DefaultMacroBacktraceLimit

Definition DiagnosticOptions.h:83

@ DefaultSnippetLineLimit

Definition DiagnosticOptions.h:87

std::string DiagnosticSuppressionMappingsFile

Path for the file that defines diagnostic suppression mappings.

Definition DiagnosticOptions.h:111

std::vector< std::string > Remarks

The list of -R... options used to alter the diagnostic mappings, with the prefixes removed.

Definition DiagnosticOptions.h:123

TextDiagnosticFormat

Definition DiagnosticOptions.h:77

@ MSVC

Definition DiagnosticOptions.h:77

@ SARIF

Definition DiagnosticOptions.h:77

@ Clang

Definition DiagnosticOptions.h:77

@ Vi

Definition DiagnosticOptions.h:77

friend bool ParseDiagnosticArgs(DiagnosticOptions &, llvm::opt::ArgList &, clang::DiagnosticsEngine *, bool)

Fill out Opts based on the options given in Args.

std::vector< std::string > Warnings

The list of -W... options used to alter the diagnostic mappings, with the prefixes removed.

Definition DiagnosticOptions.h:115

DiagnosticOptions()

Definition DiagnosticOptions.h:141

friend class CompilerInvocationBase

Definition DiagnosticOptions.h:74

std::string DiagnosticLogFile

The file to log diagnostic output to.

Definition DiagnosticOptions.h:105

std::vector< std::string > VerifyPrefixes

The prefixes for comment directives sought by -verify ("expected" by default).

Definition DiagnosticOptions.h:127

std::vector< std::string > UndefPrefixes

The list of prefixes from -Wundef-prefix=... used to generate warnings for undefined macros.

Definition DiagnosticOptions.h:119

friend class CompilerInvocation

Definition DiagnosticOptions.h:73

std::vector< std::string > SystemHeaderWarningsModules

The list of -Wsystem-headers-in-module=... options used to override whether -Wsystem-headers is enabl...

Definition DiagnosticOptions.h:131

std::string DiagnosticSerializationFile

The file to serialize diagnostics to (non-appending).

Definition DiagnosticOptions.h:108

Concrete class used by the front-end to report problems and issues.

The JSON file list parser is used to communicate input to InstallAPI.

DiagnosticLevelMask

A bitmask representing the diagnostic levels used by VerifyDiagnosticConsumer.

Definition DiagnosticOptions.h:38

@ Warning

Definition DiagnosticOptions.h:42

@ Note

Definition DiagnosticOptions.h:40

@ Error

Definition DiagnosticOptions.h:43

@ Remark

Definition DiagnosticOptions.h:41

@ All

Definition DiagnosticOptions.h:44

DiagnosticOptions::TextDiagnosticFormat TextDiagnosticFormat

Definition DiagnosticOptions.h:148

DiagnosticLevelMask operator&(DiagnosticLevelMask LHS, DiagnosticLevelMask RHS)

Definition DiagnosticOptions.h:59

OverloadsShown

Specifies which overload candidates to display when overload resolution fails.

Definition DiagnosticOptions.h:28

@ Ovl_All

Show all overloads.

Definition DiagnosticOptions.h:30

@ Ovl_Best

Show just the "best" overload candidates.

Definition DiagnosticOptions.h:33

DiagnosticLevelMask operator~(DiagnosticLevelMask M)

Definition DiagnosticOptions.h:47

DiagnosticLevelMask operator|(DiagnosticLevelMask LHS, DiagnosticLevelMask RHS)

Definition DiagnosticOptions.h:52

const StreamingDiagnostic & operator<<(const StreamingDiagnostic &DB, const ConceptReference *C)

Insertion operator for diagnostics.

@ None

The alignment was not explicit in code.

Definition DiagnosticOptions.h:18

Diagnostic wrappers for TextAPI types for error reporting.