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

Daniel Dunbar daniel at zuster.org
Fri Mar 9 07:39:12 PST 2012


Author: ddunbar
Date: Fri Mar  9 09:39:11 2012
New Revision: 152409

URL: http://llvm.org/viewvc/llvm-project?rev=152409&view=rev
Log:
[AST] Add DeclaratioName::getLoc{Start,End} for consistency.

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=152409&r1=152408&r2=152409&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclarationName.h (original)
+++ cfe/trunk/include/clang/AST/DeclarationName.h Fri Mar  9 09:39:11 2012
@@ -515,6 +515,13 @@
     SourceLocation EndLoc = getEndLoc();
     return SourceRange(BeginLoc, EndLoc.isValid() ? EndLoc : BeginLoc);
   }
+  SourceLocation getLocStart() const {
+    return getBeginLoc();
+  }
+  SourceLocation getLocEnd() const {
+    SourceLocation EndLoc = getEndLoc();
+    return EndLoc.isValid() ? EndLoc : getLocStart();
+  }
 };
 
 /// Insertion operator for diagnostics.  This allows sending DeclarationName's





More information about the cfe-commits mailing list