Coverage Report

Created: 2026-03-12 06:35

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/CMake/Source/cmGccDepfileLexerHelper.h
Line
Count
Source
1
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2
   file LICENSE.rst or https://cmake.org/licensing for details.  */
3
#pragma once
4
5
#include <utility>
6
7
#include <cmGccDepfileReaderTypes.h>
8
9
class cmGccDepfileLexerHelper
10
{
11
public:
12
5.67k
  cmGccDepfileLexerHelper() = default;
13
14
  bool readFile(char const* filePath);
15
5.61k
  cmGccDepfileContent extractContent() && { return std::move(this->Content); }
16
17
  // Functions called by the lexer
18
  void newEntry();
19
  void newRule();
20
  void newDependency();
21
  void newRuleOrDependency();
22
  void addToCurrentPath(char const* s);
23
24
private:
25
  void sanitizeContent();
26
27
  cmGccDepfileContent Content;
28
29
  enum class State
30
  {
31
    Rule,
32
    Dependency,
33
    Failed,
34
  };
35
  State HelperState = State::Rule;
36
};
37
38
#define YY_EXTRA_TYPE cmGccDepfileLexerHelper*