clang-tools  12.0.0git
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:
Inheritance graph
[legend]
Collaboration diagram for clang::tooling::ExpandModularHeadersPPCallbacks:
Collaboration graph
[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 43 of file ExpandModularHeadersPPCallbacks.h.

Constructor & Destructor Documentation

◆ ExpandModularHeadersPPCallbacks()

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

◆ ~ExpandModularHeadersPPCallbacks()

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

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 96 of file ExpandModularHeadersPPCallbacks.cpp.

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


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