clang 22.0.0git
clang::SuppressAccessChecks Class Reference

A RAII object used to temporarily suppress access-like checking. More...

#include "clang/Parse/RAIIObjectsForParser.h"

Public Member Functions

 SuppressAccessChecks (Parser &P, bool activate=true)
 Begin suppressing access-like checks.
 SuppressAccessChecks (SuppressAccessChecks &&Other)
void operator= (SuppressAccessChecks &&Other)=delete
void done ()
void redelay ()
 ~SuppressAccessChecks ()

Detailed Description

A RAII object used to temporarily suppress access-like checking.

Access-like checks are those associated with controlling the use of a declaration, like C++ access control errors and deprecation warnings. They are contextually dependent, in that they can only be resolved with full information about what's being declared. They are also suppressed in certain contexts, like the template arguments of an explicit instantiation. However, those suppression contexts cannot necessarily be fully determined in advance; for example, something starting like this: template <> class std::vector<A::PrivateType> might be the entirety of an explicit instantiation: template <> class std::vector<A::PrivateType>; or just an elaborated type specifier: template <> class std::vector<A::PrivateType> make_vector<>(); Therefore this class collects all the diagnostics and permits them to be re-delayed in a new context.

Definition at line 44 of file RAIIObjectsForParser.h.

Constructor & Destructor Documentation

◆ SuppressAccessChecks() [1/2]

clang::SuppressAccessChecks::SuppressAccessChecks ( Parser & P,
bool activate = true )
inline

Begin suppressing access-like checks.

Definition at line 52 of file RAIIObjectsForParser.h.

References clang::nullptr.

Referenced by operator=(), and SuppressAccessChecks().

◆ SuppressAccessChecks() [2/2]

clang::SuppressAccessChecks::SuppressAccessChecks ( SuppressAccessChecks && Other)
inline

Definition at line 61 of file RAIIObjectsForParser.h.

References clang::Other, and SuppressAccessChecks().

◆ ~SuppressAccessChecks()

clang::SuppressAccessChecks::~SuppressAccessChecks ( )
inline

Definition at line 81 of file RAIIObjectsForParser.h.

References done().

Member Function Documentation

◆ done()

void clang::SuppressAccessChecks::done ( )
inline

Definition at line 68 of file RAIIObjectsForParser.h.

Referenced by ~SuppressAccessChecks().

◆ operator=()

void clang::SuppressAccessChecks::operator= ( SuppressAccessChecks && Other)
delete

◆ redelay()

void clang::SuppressAccessChecks::redelay ( )
inline

Definition at line 74 of file RAIIObjectsForParser.h.


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