[cfe-commits] r140520 - /cfe/trunk/include/clang/Basic/SourceManager.h

Argyrios Kyrtzidis akyrtzi at gmail.com
Mon Sep 26 01:01:45 PDT 2011


Author: akirtzidis
Date: Mon Sep 26 03:01:45 2011
New Revision: 140520

URL: http://llvm.org/viewvc/llvm-project?rev=140520&view=rev
Log:
Remove SourceManager::getLocation().

It's not descriptive enough and it's just a call of translateFileLineCol()
followed by a call to getMacroArgExpandedLocation(), which is better to be
called explicitly since it has a certain cost and is not always required.

Modified:
    cfe/trunk/include/clang/Basic/SourceManager.h

Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=140520&r1=140519&r2=140520&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Mon Sep 26 03:01:45 2011
@@ -1107,20 +1107,6 @@
   ///
   /// If the source file is included multiple times, the source location will
   /// be based upon the first inclusion.
-  ///
-  /// If the location points inside a function macro argument, the returned
-  /// location will be the macro location in which the argument was expanded.
-  /// \sa getMacroArgExpandedLocation
-  SourceLocation getLocation(const FileEntry *SourceFile,
-                             unsigned Line, unsigned Col) {
-    SourceLocation Loc = translateFileLineCol(SourceFile, Line, Col);
-    return getMacroArgExpandedLocation(Loc);
-  }
-
-  /// \brief Get the source location for the given file:line:col triplet.
-  ///
-  /// If the source file is included multiple times, the source location will
-  /// be based upon the first inclusion.
   SourceLocation translateFileLineCol(const FileEntry *SourceFile,
                                       unsigned Line, unsigned Col) const;
 





More information about the cfe-commits mailing list