clang 17.0.0git
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
clang::DiagnosticOptions Class Reference

Options for controlling the compiler diagnostics engine. More...

#include "clang/Basic/DiagnosticOptions.h"

Inheritance diagram for clang::DiagnosticOptions:
Inheritance graph
[legend]
Collaboration diagram for clang::DiagnosticOptions:
Collaboration graph
[legend]

Public Types

enum  TextDiagnosticFormat { Clang , MSVC , Vi , SARIF }
 
enum  {
  DefaultTabStop = 8 , MaxTabStop = 100 , DefaultMacroBacktraceLimit = 6 , DefaultTemplateBacktraceLimit = 10 ,
  DefaultConstexprBacktraceLimit = 10 , DefaultSpellCheckingLimit = 50 , DefaultSnippetLineLimit = 1
}
 

Public Member Functions

 DiagnosticOptions ()
 

Public Attributes

std::string DiagnosticLogFile
 The file to log diagnostic output to.
 
std::string DiagnosticSerializationFile
 The file to serialize diagnostics to (non-appending).
 
std::vector< std::string > Warnings
 The list of -W... options used to alter the diagnostic mappings, with the prefixes removed.
 
std::vector< std::string > UndefPrefixes
 The list of prefixes from -Wundef-prefix=... used to generate warnings for undefined macros.
 
std::vector< std::string > Remarks
 The list of -R... options used to alter the diagnostic mappings, with the prefixes removed.
 
std::vector< std::string > VerifyPrefixes
 The prefixes for comment directives sought by -verify ("expected" by default).
 

Friends

class CompilerInvocation
 
bool ParseDiagnosticArgs (DiagnosticOptions &, llvm::opt::ArgList &, clang::DiagnosticsEngine *, bool)
 Fill out Opts based on the options given in Args.
 

Detailed Description

Options for controlling the compiler diagnostics engine.

Definition at line 70 of file DiagnosticOptions.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
DefaultTabStop 
MaxTabStop 
DefaultMacroBacktraceLimit 
DefaultTemplateBacktraceLimit 
DefaultConstexprBacktraceLimit 
DefaultSpellCheckingLimit 
DefaultSnippetLineLimit 

Definition at line 80 of file DiagnosticOptions.h.

◆ TextDiagnosticFormat

Enumerator
Clang 
MSVC 
Vi 
SARIF 

Definition at line 77 of file DiagnosticOptions.h.

Constructor & Destructor Documentation

◆ DiagnosticOptions()

clang::DiagnosticOptions::DiagnosticOptions ( )
inline

Definition at line 133 of file DiagnosticOptions.h.

Friends And Related Function Documentation

◆ CompilerInvocation

friend class CompilerInvocation
friend

Definition at line 74 of file DiagnosticOptions.h.

◆ ParseDiagnosticArgs

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

Fill out Opts based on the options given in Args.

Args must have been created from the OptTable returned by createCC1OptTable().

When errors are encountered, return false and, if Diags is non-null, report the error(s).

Member Data Documentation

◆ DiagnosticLogFile

std::string clang::DiagnosticOptions::DiagnosticLogFile

The file to log diagnostic output to.

Definition at line 104 of file DiagnosticOptions.h.

Referenced by clang::CompilerInstance::createDiagnostics(), and SetUpDiagnosticLog().

◆ DiagnosticSerializationFile

std::string clang::DiagnosticOptions::DiagnosticSerializationFile

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

Definition at line 107 of file DiagnosticOptions.h.

Referenced by clang::CompilerInstance::createDiagnostics().

◆ Remarks

std::vector<std::string> clang::DiagnosticOptions::Remarks

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

Definition at line 119 of file DiagnosticOptions.h.

Referenced by clang::ProcessWarningOptions().

◆ UndefPrefixes

std::vector<std::string> clang::DiagnosticOptions::UndefPrefixes

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

Definition at line 115 of file DiagnosticOptions.h.

Referenced by EvaluateValue().

◆ VerifyPrefixes

std::vector<std::string> clang::DiagnosticOptions::VerifyPrefixes

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

Definition at line 123 of file DiagnosticOptions.h.

Referenced by ParseDirective().

◆ Warnings

std::vector<std::string> clang::DiagnosticOptions::Warnings

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

Definition at line 111 of file DiagnosticOptions.h.

Referenced by clang::ProcessWarningOptions().


The documentation for this class was generated from the following file: