clang 22.0.0git
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 391 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 401 of file CodeGenOptions.h.

References Regex.

Referenced by patternMatches().

◆ patternMatches()

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

Matches the given string against the regex, if there is some.

Definition at line 404 of file CodeGenOptions.h.

References hasValidPattern(), and Regex.

Member Data Documentation

◆ Kind

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

Definition at line 392 of file CodeGenOptions.h.

◆ Pattern

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

Definition at line 393 of file CodeGenOptions.h.

◆ Regex

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

Definition at line 394 of file CodeGenOptions.h.

Referenced by hasValidPattern(), and patternMatches().


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