class ParamIdx
Declaration
class ParamIdx { /* full declaration omitted */ };
Description
A single parameter index whose accessors require each use to make explicit the parameter index encoding needed.
Declared at: clang/include/clang/AST/Attr.h:227
Member Variables
- private unsigned int Idx
- private unsigned int HasThis
- private unsigned int IsValid
Method Overview
- public ParamIdx()
- public ParamIdx(unsigned int Idx, const clang::Decl * D)
- private void assertComparable(const clang::ParamIdx & I) const
- public static clang::ParamIdx deserialize(clang::ParamIdx::SerialType S)
- public unsigned int getASTIndex() const
- public unsigned int getLLVMIndex() const
- public unsigned int getSourceIndex() const
- public bool isValid() const
- public clang::ParamIdx::SerialType serialize() const
Methods
¶ParamIdx()
ParamIdx()
Description
Construct an invalid parameter index (\c isValid returns false and accessors fail an assert).
Declared at: clang/include/clang/AST/Attr.h:247
¶ParamIdx(unsigned int Idx, const clang::Decl* D)
ParamIdx(unsigned int Idx, const clang::Decl* D)
Declared at: clang/include/clang/AST/Attr.h:255
Parameters
- unsigned int Idx
- is the parameter index as it is normally specified in attributes in the source: one-origin including any C++ implicit this parameter.
- const clang::Decl* D
- is the declaration containing the parameters. It is used to determine if there is a C++ implicit this parameter.
¶void assertComparable(
const clang::ParamIdx& I) const
void assertComparable(
const clang::ParamIdx& I) const
Declared at: clang/include/clang/AST/Attr.h:233
Parameters
- const clang::ParamIdx& I
¶static clang::ParamIdx deserialize(
clang::ParamIdx::SerialType S)
static clang::ParamIdx deserialize(
clang::ParamIdx::SerialType S)
Description
Construct from a result from \c serialize.
Declared at: clang/include/clang/AST/Attr.h:275
Parameters
- clang::ParamIdx::SerialType S
¶unsigned int getASTIndex() const
unsigned int getASTIndex() const
Description
Get the parameter index as it would normally be encoded at the AST level of representation: zero-origin not including any C++ implicit this parameter. This is the encoding primarily used in Sema. However, in diagnostics, Sema uses \c getSourceIndex instead.
Declared at: clang/include/clang/AST/Attr.h:304
¶unsigned int getLLVMIndex() const
unsigned int getLLVMIndex() const
Description
Get the parameter index as it would normally be encoded at the LLVM level of representation: zero-origin including any C++ implicit this parameter. This is the encoding primarily used in CodeGen.
Declared at: clang/include/clang/AST/Attr.h:315
¶unsigned int getSourceIndex() const
unsigned int getSourceIndex() const
Description
Get the parameter index as it would normally be encoded for attributes at the source level of representation: one-origin including any C++ implicit this parameter. This encoding thus makes sense for diagnostics, pretty printing, and constructing new attributes from a source-like specification.
Declared at: clang/include/clang/AST/Attr.h:293
¶bool isValid() const
bool isValid() const
Description
Is this parameter index valid?
Declared at: clang/include/clang/AST/Attr.h:285
¶clang::ParamIdx::SerialType serialize() const
clang::ParamIdx::SerialType serialize() const
Description
Produce a representation that can later be passed to \c deserialize to construct an equivalent \c ParamIdx.
Declared at: clang/include/clang/AST/Attr.h:270