diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-01-23 11:10:26 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-01-23 11:10:26 +0000 |
commit | 2fce988e86bc01829142e4362d4eff1af0925147 (patch) | |
tree | c69d3f4f13d508570bb5257a6aea735f88bdf09c /lib/AST/Decl.cpp | |
parent | a3fa5c7f1b5e2ba4d6ec033dc0e2376326b05824 (diff) | |
download | FreeBSD-src-2fce988e86bc01829142e4362d4eff1af0925147.zip FreeBSD-src-2fce988e86bc01829142e4362d4eff1af0925147.tar.gz |
Update clang to r94309.
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index e77661a..794b14a 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -629,9 +629,13 @@ VarDecl::~VarDecl() { } SourceRange VarDecl::getSourceRange() const { + SourceLocation Start = getTypeSpecStartLoc(); + if (Start.isInvalid()) + Start = getLocation(); + if (getInit()) - return SourceRange(getLocation(), getInit()->getLocEnd()); - return SourceRange(getLocation(), getLocation()); + return SourceRange(Start, getInit()->getLocEnd()); + return SourceRange(Start, getLocation()); } bool VarDecl::isOutOfLine() const { |