]> granicus.if.org Git - clang/commitdiff
Removed duplicate logic.
authorErik Verbruggen <erikjv@me.com>
Sat, 29 Dec 2012 11:27:03 +0000 (11:27 +0000)
committerErik Verbruggen <erikjv@me.com>
Sat, 29 Dec 2012 11:27:03 +0000 (11:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171218 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclarationName.h

index cf960bfd6972c40973f8ed8531297a2d924a63a2..d302db48b3acf7c4b57285eaf6a3f4d0d1701c81 100644 (file)
@@ -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();