clang 19.0.0git
Public Member Functions | Public Attributes | List of all members
clang::CodeGenOptions::OptRemark Struct Reference

Optimization remark with an optional regular expression pattern. More...

#include "clang/Basic/CodeGenOptions.h"

Public Member Functions

 OptRemark ()=default
 By default, optimization remark is missing.
 
bool hasValidPattern () const
 Returns true iff the optimization remark holds a valid regular expression.
 
bool patternMatches (StringRef String) const
 Matches the given string against the regex, if there is some.
 

Public Attributes

RemarkKind Kind = RK_Missing
 
std::string Pattern
 
std::shared_ptr< llvm::Regex > Regex
 

Detailed Description

Optimization remark with an optional regular expression pattern.

Definition at line 339 of file CodeGenOptions.h.

Constructor & Destructor Documentation

◆ OptRemark()

clang::CodeGenOptions::OptRemark::OptRemark ( )
default

By default, optimization remark is missing.

Member Function Documentation

◆ hasValidPattern()

bool clang::CodeGenOptions::OptRemark::hasValidPattern ( ) const
inline

Returns true iff the optimization remark holds a valid regular expression.

Definition at line 349 of file CodeGenOptions.h.

References Regex.

Referenced by clang::ClangDiagnosticHandler::isAnyRemarkEnabled(), and patternMatches().

◆ patternMatches()

bool clang::CodeGenOptions::OptRemark::patternMatches ( StringRef  String) const
inline

Member Data Documentation

◆ Kind

RemarkKind clang::CodeGenOptions::OptRemark::Kind = RK_Missing

Definition at line 340 of file CodeGenOptions.h.

◆ Pattern

std::string clang::CodeGenOptions::OptRemark::Pattern

Definition at line 341 of file CodeGenOptions.h.

◆ Regex

std::shared_ptr<llvm::Regex> clang::CodeGenOptions::OptRemark::Regex

Definition at line 342 of file CodeGenOptions.h.

Referenced by hasValidPattern(), and patternMatches().


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