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());
OptionalDiagnostic & operator<<(const T &v)
OptionalDiagnostic & operator<<(const APFixedPoint &FX)
The APFixedPoint class works similarly to APInt/APSInt in that it is a functional replacement for a s...
A partial diagnostic which we might know in advance that we are not going to emit.
void toString(llvm::SmallVectorImpl< char > &Str) const
Dataflow Directional Tag Classes.
Implements a partial diagnostic that can be emitted anwyhere in a DiagnosticBuilder stream...
OptionalDiagnostic & operator<<(const llvm::APFloat &F)
OptionalDiagnostic & operator<<(const llvm::APSInt &I)
OptionalDiagnostic(PartialDiagnostic *Diag=nullptr)