diff options
Diffstat (limited to 'include/clang/AST/Decl.h')
-rw-r--r-- | include/clang/AST/Decl.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 66099217b0..a5c3ea0680 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -1137,16 +1137,19 @@ class FieldDecl : public ValueDecl { // FIXME: This can be packed into the bitfields in Decl. bool Mutable : 1; Expr *BitWidth; + SourceLocation TypeSpecStartLoc; protected: FieldDecl(Kind DK, DeclContext *DC, SourceLocation L, - IdentifierInfo *Id, QualType T, Expr *BW, bool Mutable) - : ValueDecl(DK, DC, L, Id, T), Mutable(Mutable), BitWidth(BW) - { } + IdentifierInfo *Id, QualType T, Expr *BW, bool Mutable, + SourceLocation TSSL = SourceLocation()) + : ValueDecl(DK, DC, L, Id, T), Mutable(Mutable), BitWidth(BW), + TypeSpecStartLoc(TSSL) { } public: static FieldDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, QualType T, Expr *BW, - bool Mutable); + bool Mutable, + SourceLocation TypeSpecStartLoc = SourceLocation()); /// isMutable - Determines whether this field is mutable (C++ only). bool isMutable() const { return Mutable; } @@ -1154,6 +1157,9 @@ public: /// \brief Set whether this field is mutable (C++ only). void setMutable(bool M) { Mutable = M; } + SourceLocation getTypeSpecStartLoc() const { return TypeSpecStartLoc; } + void setTypeSpecStartLoc(SourceLocation TSSL) { TypeSpecStartLoc = TSSL; } + /// isBitfield - Determines whether this field is a bitfield. bool isBitField() const { return BitWidth != NULL; } |