//===- PartialDiagnostic.h - Diagnostic "closures" --------------*- 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 /// Implements a partial diagnostic that can be emitted anwyhere /// in a DiagnosticBuilder stream. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_BASIC_PARTIALDIAGNOSTIC_H #define LLVM_CLANG_BASIC_PARTIALDIAGNOSTIC_H #include "clang/Basic/Diagnostic.h" #include "clang/Basic/LLVM.h" #include "clang/Basic/SourceLocation.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include <cassert> #include <cstdint> #include <string> #include <type_traits> #include <utility> namespace clang { class PartialDiagnostic : public StreamingDiagnostic { … }; inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB, const PartialDiagnostic &PD) { … } /// A partial diagnostic along with the source location where this /// diagnostic occurs. PartialDiagnosticAt; } // namespace clang #endif // LLVM_CLANG_BASIC_PARTIALDIAGNOSTIC_H