15 #ifndef LLVM_CLANG_SEMA_DESIGNATOR_H 16 #define LLVM_CLANG_SEMA_DESIGNATOR_H 19 #include "llvm/ADT/SmallVector.h" 45 struct FieldDesignatorInfo {
50 struct ArrayDesignatorInfo {
53 mutable unsigned RBracketLoc;
55 struct ArrayRangeDesignatorInfo {
57 unsigned LBracketLoc, EllipsisLoc;
58 mutable unsigned RBracketLoc;
188 Designators.push_back(D);
191 bool empty()
const {
return Designators.empty(); }
195 assert(Idx < Designators.size());
196 return Designators[Idx];
void ClearExprs(Sema &Actions)
ClearExprs - Null out any expression references, which prevents them from being 'delete'd later...
SourceLocation getEllipsisLoc() const
unsigned getRawEncoding() const
When a SourceLocation itself cannot be used, this returns an (opaque) 32-bit integer encoding for it...
ArrayRangeDesignatorInfo ArrayRangeInfo
const IdentifierInfo * getField() const
bool isArrayRangeDesignator() const
void setRBracketLoc(SourceLocation RBracketLoc) const
Expr * getArrayRangeStart() const
One of these records is kept for each identifier that is lexed.
FieldDesignatorInfo FieldInfo
static SourceLocation getFromRawEncoding(unsigned Encoding)
Turn a raw encoding of a SourceLocation object into a real SourceLocation.
ArrayDesignatorInfo ArrayInfo
static Designator getField(const IdentifierInfo *II, SourceLocation DotLoc, SourceLocation NameLoc)
Sema - This implements semantic analysis and AST building for C.
unsigned getNumDesignators() const
This represents one expression.
bool isArrayDesignator() const
void ClearExprs(Sema &Actions)
ClearExprs - Null out any expression references, which prevents them from being 'delete'd later...
Expr * getArrayRangeEnd() const
Expr * getArrayIndex() const
void FreeExprs(Sema &Actions)
FreeExprs - Release any unclaimed memory for the expressions in this designation. ...
const Designator & getDesignator(unsigned Idx) const
Encodes a location in the source.
SourceLocation getFieldLoc() const
bool isFieldDesignator() const
SourceLocation getLBracketLoc() const
Dataflow Directional Tag Classes.
void AddDesignator(Designator D)
AddDesignator - Add a designator to the end of this list.
DesignatorKind getKind() const
Defines the clang::SourceLocation class and associated facilities.
SourceLocation getRBracketLoc() const
void FreeExprs(Sema &Actions)
FreeExprs - Release any unclaimed memory for the expressions in this designator.
Designation - Represent a full designation, which is a sequence of designators.
Designator - A designator in a C99 designated initializer.
static Designator getArray(Expr *Index, SourceLocation LBracketLoc)
SourceLocation getDotLoc() const
static Designator getArrayRange(Expr *Start, Expr *End, SourceLocation LBracketLoc, SourceLocation EllipsisLoc)