diff options
author | Abramo Bagnara <abramo.bagnara@gmail.com> | 2011-03-08 11:07:11 +0000 |
---|---|---|
committer | Abramo Bagnara <abramo.bagnara@gmail.com> | 2011-03-08 11:07:11 +0000 |
commit | f2cf562cec11dec926c0a29a71769a27fed02962 (patch) | |
tree | 4dae02daad7fef8cc697dae63f598d0915abb76a /lib/AST/Decl.cpp | |
parent | df045200e0220f10bf03de05ca878949e0c40a5a (diff) |
Fixed bitfields source range.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 95f5756402..15f906b16e 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -1968,6 +1968,11 @@ unsigned FieldDecl::getFieldIndex() const { return index; } +SourceRange FieldDecl::getSourceRange() const { + return SourceRange(getInnerLocStart(), + isBitField() ? BitWidth->getLocEnd() : getLocation()); +} + //===----------------------------------------------------------------------===// // TagDecl Implementation //===----------------------------------------------------------------------===// |