[cfe-commits] r171218 - /cfe/trunk/include/clang/AST/DeclarationName.h

Erik Verbruggen erikjv at me.com
Sat Dec 29 03:27:03 PST 2012


Author: erikjv
Date: Sat Dec 29 05:27:03 2012
New Revision: 171218

URL: http://llvm.org/viewvc/llvm-project?rev=171218&view=rev
Log:
Removed duplicate logic.

Modified:
    cfe/trunk/include/clang/AST/DeclarationName.h

Modified: cfe/trunk/include/clang/AST/DeclarationName.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclarationName.h?rev=171218&r1=171217&r2=171218&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclarationName.h (original)
+++ cfe/trunk/include/clang/AST/DeclarationName.h Sat Dec 29 05:27:03 2012
@@ -521,9 +521,7 @@
   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();





More information about the cfe-commits mailing list