clang-tools 10.0.0

Classes | Public Member Functions | List of all members
clang::tooling::ExpandModularHeadersPPCallbacks Class Reference

Handles PPCallbacks and re-runs preprocessing of the whole translation unit with modules disabled. More...

`#include <ExpandModularHeadersPPCallbacks.h>`

Inheritance diagram for clang::tooling::ExpandModularHeadersPPCallbacks:
[legend]
Collaboration diagram for clang::tooling::ExpandModularHeadersPPCallbacks:
[legend]

## Classes
class | FileRecorder

## Public Member Functions
| ExpandModularHeadersPPCallbacks (CompilerInstance *Compiler, IntrusiveRefCntPtr< llvm::vfs::OverlayFileSystem > OverlayFS)
| ~ExpandModularHeadersPPCallbacks ()
Preprocessor * | getPreprocessor () const
| Returns the preprocessor that provides callbacks for the whole translation unit, including the main file, textual headers, and modular headers. More...

## Detailed Description

Handles PPCallbacks and re-runs preprocessing of the whole translation unit with modules disabled.

This way it's possible to get PPCallbacks for the whole translation unit including the contents of the modular headers and all their transitive includes.

This allows existing tools based on PPCallbacks to retain their functionality when running with C++ modules enabled. This only works in the backwards compatible modules mode, i.e. when code can still be parsed in non-modular way.

Definition at line 36 of file ExpandModularHeadersPPCallbacks.h.

## Constructor & Destructor Documentation

## ◆ ExpandModularHeadersPPCallbacks()

clang::tooling::ExpandModularHeadersPPCallbacks::ExpandModularHeadersPPCallbacks | ( | CompilerInstance * | Compiler,
|  | IntrusiveRefCntPtr< llvm::vfs::OverlayFileSystem > | OverlayFS
| ) |  |

Definition at line 54 of file ExpandModularHeadersPPCallbacks.cpp.

References ~ExpandModularHeadersPPCallbacks().

## ◆ ~ExpandModularHeadersPPCallbacks()

clang::tooling::ExpandModularHeadersPPCallbacks::~ExpandModularHeadersPPCallbacks | ( |  | ) |
| default

Referenced by ExpandModularHeadersPPCallbacks().

## Member Function Documentation

## ◆ getPreprocessor()

Preprocessor * clang::tooling::ExpandModularHeadersPPCallbacks::getPreprocessor | ( |  | ) | const

Returns the preprocessor that provides callbacks for the whole translation unit, including the main file, textual headers, and modular headers.

This preprocessor is separate from the one used by the rest of the compiler.

Definition at line 94 of file ExpandModularHeadersPPCallbacks.cpp.

References IsAngled, Loc, clang::doc::MD(), and Range.

The documentation for this class was generated from the following files:

- ExpandModularHeadersPPCallbacks.h
- ExpandModularHeadersPPCallbacks.cpp