clang-tools 22.0.0git
clang::clangd::config::Fragment::IfBlock Struct Reference

Conditions in the If block restrict when a Fragment applies. More...

#include <ConfigFragment.h>

Public Attributes

std::vector< Located< std::string > > PathMatch
 The file being processed must fully match a regular expression.
std::vector< Located< std::string > > PathExclude
 The file being processed must not fully match a regular expression.
bool HasUnrecognizedCondition = false
 An unrecognized key was found while parsing the condition.

Detailed Description

Conditions in the If block restrict when a Fragment applies.

Each separate condition must match (combined with AND). When one condition has multiple values, any may match (combined with OR). e.g. PathMatch: [foo/.*, bar/.*] matches files in either directory.

Conditions based on a file's path use the following form:

  • if the fragment came from a project directory, the path is relative
  • if the fragment is global (e.g. user config), the path is absolute
  • paths always use forward-slashes (UNIX-style) If no file is being processed, these conditions will not match.

Definition at line 113 of file ConfigFragment.h.

Member Data Documentation

◆ HasUnrecognizedCondition

bool clang::clangd::config::Fragment::IfBlock::HasUnrecognizedCondition = false

An unrecognized key was found while parsing the condition.

The condition will evaluate to false.

Definition at line 121 of file ConfigFragment.h.

◆ PathExclude

std::vector<Located<std::string> > clang::clangd::config::Fragment::IfBlock::PathExclude

The file being processed must not fully match a regular expression.

Definition at line 117 of file ConfigFragment.h.

◆ PathMatch

std::vector<Located<std::string> > clang::clangd::config::Fragment::IfBlock::PathMatch

The file being processed must fully match a regular expression.

Definition at line 115 of file ConfigFragment.h.


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