aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo.bagnara@gmail.com>2011-03-12 11:17:06 +0000
committerAbramo Bagnara <abramo.bagnara@gmail.com>2011-03-12 11:17:06 +0000
commit796aa443ab5ed036f42ef33fed629e1b4b34871b (patch)
tree9d2d4a6585b9fb92d17576d32b666e517a691e05 /lib/Sema/SemaDeclCXX.cpp
parent3deeb6deaed56f28baa32296b10e259cb3e4127b (diff)
Forgotten part of previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127536 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--lib/Sema/SemaDeclCXX.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index a72c75b337..2bce585dd2 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -7440,10 +7440,14 @@ bool Sema::CheckOverridingFunctionReturnType(const CXXMethodDecl *New,
///
/// \param InitRange the source range that covers the "0" initializer.
bool Sema::CheckPureMethod(CXXMethodDecl *Method, SourceRange InitRange) {
+ SourceLocation EndLoc = InitRange.getEnd();
+ if (EndLoc.isValid())
+ Method->setRangeEnd(EndLoc);
+
if (Method->isVirtual() || Method->getParent()->isDependentContext()) {
Method->setPure();
return false;
- }
+ }
if (!Method->isInvalidDecl())
Diag(Method->getLocation(), diag::err_non_virtual_pure)