15 #ifndef LLVM_CLANG_ANALYSIS_ANALYSES_OSLOG_H
16 #define LLVM_CLANG_ANALYSIS_ANALYSES_OSLOG_H
22 namespace analyze_os_log {
68 const Expr *TheExpr =
nullptr;
75 : TheKind(kind), TheExpr(expr), Size(size), Flags(flags) {}
79 Size(Ctx.getTypeSizeInChars(Ctx.IntTy)), Flags(flags) {}
82 unsigned char result = 0;
111 for (
auto &item :
Items) {
135 unsigned char result = 0;
151 OSLogBufferLayout &layout);
Defines the clang::ASTContext interface.
const internal::VariadicDynCastAllOfMatcher< Stmt, Expr > expr
Matches expressions.
QuantityType getQuantity() const
getQuantity - Get the raw integer representation of this quantity.
CharUnits getConstValue() const
OSLogBufferItem(ASTContext &Ctx, CharUnits value, unsigned flags)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
CharUnits - This is an opaque type for sizes expressed in character units.
unsigned char getDescriptorByte() const
bool computeOSLogBufferLayout(clang::ASTContext &Ctx, const clang::CallExpr *E, OSLogBufferLayout &layout)
An OSLogBufferItem represents a single item in the data written by a call to os_log() or os_trace()...
Expr - This represents one expression.
unsigned char getSizeByte() const
bool getIsPrivate() const
const Expr * getExpr() const
static CharUnits fromQuantity(QuantityType Quantity)
fromQuantity - Construct a CharUnits quantity from a raw integer type.
unsigned char getSummaryByte() const
bool hasNonScalar() const
detail::InMemoryDirectory::const_iterator E
SmallVector< OSLogBufferItem, 4 > Items
unsigned char getNumArgsByte() const
bool hasPrivateItems() const
bool hasPublicItems() const
unsigned kind
All of the diagnostics that can be emitted by the frontend.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
OSLogBufferItem(Kind kind, const Expr *expr, CharUnits size, unsigned flags)