14#ifndef LLVM_CLANG_AST_OPTIONALDIAGNOSTIC_H
15#define LLVM_CLANG_AST_OPTIONALDIAGNOSTIC_H
19#include "llvm/ADT/APFloat.h"
20#include "llvm/ADT/APSInt.h"
21#include "llvm/ADT/SmallVector.h"
22#include "llvm/ADT/StringRef.h"
44 *Diag << StringRef(Buffer.data(), Buffer.size());
57 unsigned precision = llvm::APFloat::semanticsPrecision(F.getSemantics());
58 precision = (precision * 59 + 195) / 196;
60 F.toString(Buffer, precision);
61 *Diag << StringRef(Buffer.data(), Buffer.size());
70 *Diag << StringRef(Buffer.data(), Buffer.size());
Implements a partial diagnostic that can be emitted anwyhere in a DiagnosticBuilder stream.
A partial diagnostic which we might know in advance that we are not going to emit.
OptionalDiagnostic & operator<<(const T &v)
OptionalDiagnostic & operator<<(const llvm::APSInt &I)
OptionalDiagnostic & operator<<(const llvm::APFloat &F)
OptionalDiagnostic(PartialDiagnostic *Diag=nullptr)
OptionalDiagnostic & operator<<(const llvm::APFixedPoint &FX)
The JSON file list parser is used to communicate input to InstallAPI.
const FunctionProtoType * T