diff options
author | Abramo Bagnara <abramo.bagnara@gmail.com> | 2011-03-08 16:41:52 +0000 |
---|---|---|
committer | Abramo Bagnara <abramo.bagnara@gmail.com> | 2011-03-08 16:41:52 +0000 |
commit | a2026c96d3935e7909e049ad9096762844544ed6 (patch) | |
tree | a5143046961e31715a2f956559e58fb5978a0780 /lib/AST/DeclTemplate.cpp | |
parent | 2c10c8072cabeb22651462e435e8b81f3221b6a5 (diff) |
Fixed source range for StaticAssertDecl and LinkageSpecDecl. Fixed source range for declarations using postfix types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127251 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclTemplate.cpp')
-rw-r--r-- | lib/AST/DeclTemplate.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/AST/DeclTemplate.cpp b/lib/AST/DeclTemplate.cpp index 6fd4d7ec07..de0e71ebac 100644 --- a/lib/AST/DeclTemplate.cpp +++ b/lib/AST/DeclTemplate.cpp @@ -508,10 +508,10 @@ NonTypeTemplateParmDecl::Create(const ASTContext &C, DeclContext *DC, } SourceRange NonTypeTemplateParmDecl::getSourceRange() const { - SourceLocation End = getLocation(); if (hasDefaultArgument() && !defaultArgumentWasInherited()) - End = getDefaultArgument()->getSourceRange().getEnd(); - return SourceRange(getOuterLocStart(), End); + return SourceRange(getOuterLocStart(), + getDefaultArgument()->getSourceRange().getEnd()); + return DeclaratorDecl::getSourceRange(); } SourceLocation NonTypeTemplateParmDecl::getDefaultArgumentLoc() const { |