clang  14.0.0git
PPCallbacks.cpp
Go to the documentation of this file.
1 //===--- PPCallbacks.cpp - Callbacks for Preprocessor actions ---*- 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 
11 
12 using namespace clang;
13 
14 // Out of line key method.
15 PPCallbacks::~PPCallbacks() = default;
16 
17 void PPCallbacks::HasInclude(SourceLocation Loc, StringRef FileName,
18  bool IsAngled, Optional<FileEntryRef> File,
19  SrcMgr::CharacteristicKind FileType) {}
20 
21 // Out of line key method.
23 
24 void PPChainedCallbacks::HasInclude(SourceLocation Loc, StringRef FileName,
25  bool IsAngled, Optional<FileEntryRef> File,
26  SrcMgr::CharacteristicKind FileType) {
27  First->HasInclude(Loc, FileName, IsAngled, File, FileType);
28  Second->HasInclude(Loc, FileName, IsAngled, File, FileType);
29 }
30 
clang::PPCallbacks::~PPCallbacks
virtual ~PPCallbacks()
clang::DeclaratorContext::File
@ File
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:88
clang::PPChainedCallbacks::HasInclude
void HasInclude(SourceLocation Loc, StringRef FileName, bool IsAngled, Optional< FileEntryRef > File, SrcMgr::CharacteristicKind FileType) override
Hook called when a '__has_include' or '__has_include_next' directive is read.
Definition: PPCallbacks.cpp:24
llvm::Optional< FileEntryRef >
clang::SrcMgr::CharacteristicKind
CharacteristicKind
Indicates whether a file or directory holds normal user code, system code, or system code which is im...
Definition: SourceManager.h:78
clang::PPCallbacks::HasInclude
virtual void HasInclude(SourceLocation Loc, StringRef FileName, bool IsAngled, Optional< FileEntryRef > File, SrcMgr::CharacteristicKind FileType)
Hook called when a '__has_include' or '__has_include_next' directive is read.
Definition: PPCallbacks.cpp:17
clang::PPChainedCallbacks::~PPChainedCallbacks
~PPChainedCallbacks() override
clang
Definition: CalledOnceCheck.h:17
PPCallbacks.h
FileManager.h