aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Verbruggen <erikjv@me.com>2012-12-29 11:27:03 +0000
committerErik Verbruggen <erikjv@me.com>2012-12-29 11:27:03 +0000
commit2464e96f0a73cd9757a6fdec4faf10d751d267fa (patch)
treecb294e767a9e36ebf73b6b5bac94361bd355bcc3
parent20af49a7c5bdb6cca5f4d6586106ef1ce8579311 (diff)
Removed duplicate logic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171218 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/DeclarationName.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/clang/AST/DeclarationName.h b/include/clang/AST/DeclarationName.h
index cf960bfd69..d302db48b3 100644
--- a/include/clang/AST/DeclarationName.h
+++ b/include/clang/AST/DeclarationName.h
@@ -521,9 +521,7 @@ public:
SourceLocation getEndLoc() const;
/// getSourceRange - The range of the declaration name.
SourceRange getSourceRange() const LLVM_READONLY {
- SourceLocation BeginLoc = getBeginLoc();
- SourceLocation EndLoc = getEndLoc();
- return SourceRange(BeginLoc, EndLoc.isValid() ? EndLoc : BeginLoc);
+ return SourceRange(getLocStart(), getLocEnd());
}
SourceLocation getLocStart() const LLVM_READONLY {
return getBeginLoc();