clang 20.0.0git
PPConditionalDirectiveRecord.h
Go to the documentation of this file.
1//===--- PPConditionalDirectiveRecord.h - Preprocessing Directives-*- C++ -*-=//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines the PPConditionalDirectiveRecord class, which maintains
10// a record of conditional directive regions.
11//
12//===----------------------------------------------------------------------===//
13#ifndef LLVM_CLANG_LEX_PPCONDITIONALDIRECTIVERECORD_H
14#define LLVM_CLANG_LEX_PPCONDITIONALDIRECTIVERECORD_H
15
18#include "llvm/ADT/SmallVector.h"
19#include <vector>
20
21namespace clang {
22
23/// Records preprocessor conditional directive regions and allows
24/// querying in which region source locations belong to.
26 SourceManager &SourceMgr;
27
28 SmallVector<SourceLocation, 6> CondDirectiveStack;
29
30 class CondDirectiveLoc {
32 SourceLocation RegionLoc;
33
34 public:
35 CondDirectiveLoc(SourceLocation Loc, SourceLocation RegionLoc)