//===- DelayedDiagnostic.h - Delayed declarator diagnostics -----*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // /// \file /// Defines the classes clang::DelayedDiagnostic and /// clang::AccessedEntity. /// /// DelayedDiangostic is used to record diagnostics that are being /// conditionally produced during declarator parsing. Certain kinds of /// diagnostics -- notably deprecation and access control -- are suppressed /// based on semantic properties of the parsed declaration that aren't known /// until it is fully parsed. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_SEMA_DELAYEDDIAGNOSTIC_H #define LLVM_CLANG_SEMA_DELAYEDDIAGNOSTIC_H #include "clang/AST/DeclAccessPair.h" #include "clang/AST/DeclBase.h" #include "clang/AST/DeclCXX.h" #include "clang/AST/Type.h" #include "clang/Basic/LLVM.h" #include "clang/Basic/PartialDiagnostic.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/Specifiers.h" #include "clang/Sema/Sema.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Casting.h" #include <cassert> #include <cstddef> #include <utility> namespace clang { class ObjCInterfaceDecl; class ObjCPropertyDecl; namespace sema { /// A declaration being accessed, together with information about how /// it was accessed. class AccessedEntity { … }; /// A diagnostic message which has been conditionally emitted pending /// the complete parsing of the current declaration. class DelayedDiagnostic { … }; /// A collection of diagnostics which were delayed. class DelayedDiagnosticPool { … }; } // namespace clang /// Add a diagnostic to the current delay pool. inline void Sema::DelayedDiagnostics::add(const sema::DelayedDiagnostic &diag) { … } } // namespace clang #endif // LLVM_CLANG_SEMA_DELAYEDDIAGNOSTIC_H