serialization {
21 return(value.isNull() ? std::optional<T>() : std::optional<T>(value));
25 return(value ? std::optional<T *>(value) : std::optional<T *>());
98#include "clang/AST/AbstractBasicWriter.inc" 119template<
classImpl>
122 usingBasicWriterBase<Impl>::asImpl;
128Impl &
find(
const char*propertyName) {
138asImpl().writeUInt32(uint32_t(value));
143asImpl().writeUInt32(array.size());
144 for(
const T&elt : array) {
145WriteDispatcher<T>::write(asImpl(), elt);
150WriteDispatcher<T>::write(asImpl(), PackOptionalValue<T>::pack(value));
154asImpl().writeBool(value.isUnsigned());
155asImpl().writeAPInt(value);
159asImpl().writeUInt32(value.getBitWidth());
160 constuint64_t *words = value.getRawData();
161 for(
size_ti = 0, e = value.getNumWords(); i != e; ++i)
162asImpl().writeUInt64(words[i]);
166asImpl().writeUInt32(sema.getWidth());
167asImpl().writeUInt32(sema.getScale());
168asImpl().writeUInt32(sema.isSigned() | sema.isSaturated() << 1 |
169sema.hasUnsignedPadding() << 2);
176asImpl().writeQualType(elemTy);
177asImpl().writeUInt32(path.size());
178 auto&ctx = ((BasicWriterBase<Impl> *)
this)->getASTContext();
179 for(
autoelem : path) {
181asImpl().writeUInt32(elem.getAsBaseOrMember().getInt());
182 const Decl*baseOrMember = elem.getAsBaseOrMember().getPointer();
183 if(
const auto*
recordDecl= dyn_cast<CXXRecordDecl>(baseOrMember)) {
187 const auto*
valueDecl= cast<ValueDecl>(baseOrMember);
192asImpl().writeUInt32(elem.getAsArrayIndex());
193elemTy = ctx.getAsArrayType(elemTy)->getElementType();
200 "update this if the value size changes");
206asImpl().writeUInt32(uint32_t(esi.
Type));
220 static_assert(
sizeof(epi.
getOpaqueValue()) <=
sizeof(uint32_t),
221 "opaque value doesn't fit into uint32_t");
226asImpl().writeUInt32(
E.toOpaqueInt32());
240nestedNames.push_back(NNS);
244asImpl().writeUInt32(nestedNames.size());
245 while(!nestedNames.empty()) {
246NNS = nestedNames.pop_back_val();
248asImpl().writeNestedNameSpecifierKind(kind);
275llvm_unreachable(
"bad nested name specifier kind");
Defines the clang::ASTContext interface.
Defines the C++ template declaration subclasses.
ArrayRef< LValuePathEntry > Path
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Decl - This represents one declaration (or definition), e.g.
Wrap a function effect's condition expression in another struct so that FunctionProtoType's TrailingO...
Expr * getCondition() const
Represents an abstract function effect, using just an enumeration describing its kind.
Interesting information about a specific parameter that can't simply be reflected in parameter's type...
unsigned char getOpaqueValue() const
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
CXXRecordDecl * getAsRecordDecl() const
Retrieve the record declaration stored in this nested name specifier.
SpecifierKind getKind() const
Determine what kind of nested name specifier is stored.
NamespaceAliasDecl * getAsNamespaceAlias() const
Retrieve the namespace alias stored in this nested name specifier.
IdentifierInfo * getAsIdentifier() const
Retrieve the identifier stored in this nested name specifier.
NestedNameSpecifier * getPrefix() const
Return the prefix of this nested name specifier.
SpecifierKind
The kind of specifier that completes this nested name specifier.
@ NamespaceAlias
A namespace alias, stored as a NamespaceAliasDecl*.
@ TypeSpec
A type, stored as a Type*.
@ TypeSpecWithTemplate
A type that was preceded by the 'template' keyword, stored as a Type*.
@ Super
Microsoft's '__super' specifier, stored as a CXXRecordDecl* of the class it appeared in.
@ Identifier
An identifier, stored as an IdentifierInfo*.
@ Global
The global specifier '::'. There is no stored value.
@ Namespace
A namespace, stored as a NamespaceDecl*.
NamespaceDecl * getAsNamespace() const
Retrieve the namespace stored in this nested name specifier.
const Type * getAsType() const
Retrieve the type stored in this nested name specifier.
A (possibly-)qualified type.
The collection of all-type qualifiers we support.
uint64_t getAsOpaqueValue() const
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
const T * getAs() const
Member-template getAs<specific type>'.
DataStreamBasicWriter provides convenience implementations for many BasicWriter methods based on the ...
void writeEffectConditionExpr(EffectConditionExpr CE)
void writeExceptionSpecInfo(const FunctionProtoType::ExceptionSpecInfo &esi)
void writeFixedPointSemantics(const llvm::FixedPointSemantics &sema)
void writeFunctionEffect(FunctionEffect E)
void writeArray(llvm::ArrayRef< T > array)
DataStreamBasicWriter(ASTContext &ctx)
void writeOptional(std::optional< T > value)
void writeExtParameterInfo(FunctionProtoType::ExtParameterInfo epi)
void writeAPInt(const llvm::APInt &value)
Impl & find(const char *propertyName)
Implement property-find by ignoring it.
void writeAPSInt(const llvm::APSInt &value)
void writeLValuePathSerializationHelper(APValue::LValuePathSerializationHelper lvaluePath)
void writeQualifiers(Qualifiers value)
void writeNestedNameSpecifier(NestedNameSpecifier *NNS)
const internal::VariadicDynCastAllOfMatcher< Decl, ValueDecl > valueDecl
Matches any value declaration.
const internal::VariadicDynCastAllOfMatcher< Decl, RecordDecl > recordDecl
Matches class, struct, and union declarations.
std::optional< T > makeOptionalFromNullable(const T &value)
std::optional< T * > makeOptionalFromPointer(T *value)
The JSON file list parser is used to communicate input to InstallAPI.
bool isComputedNoexcept(ExceptionSpecificationType ESpecType)
const FunctionProtoType * T
@ EST_Uninstantiated
not instantiated yet
@ EST_Unevaluated
not evaluated yet, for special member function
@ EST_Dynamic
throw(T1, T2)
Holds information about the various types of exception specification.
FunctionDecl * SourceDecl
The function whose exception specification this is, for EST_Unevaluated and EST_Uninstantiated.
FunctionDecl * SourceTemplate
The function template whose exception specification this is instantiated from, for EST_Uninstantiated...
ExceptionSpecificationType Type
The kind of exception specification this is.
ArrayRef< QualType > Exceptions
Explicitly-specified list of exception types.
Expr * NoexceptExpr
Noexcept expression, if this is a computed noexcept specification.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4