aboutsummaryrefslogtreecommitdiff
path: root/lib/Rewrite/HTMLRewrite.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-16 07:36:28 +0000
committerChris Lattner <sabre@nondot.org>2009-01-16 07:36:28 +0000
commitf7cf85b330bedd2877e1371fb0a83e99751ae162 (patch)
tree6674dd8f06d3c395ab61ad9770934c49572e200c /lib/Rewrite/HTMLRewrite.cpp
parent88054dee0402e4d3c1f64e6b697acc47195c0d72 (diff)
more SourceLocation lexicon change: instead of referring to the
"logical" location, refer to the "instantiation" location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62316 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/HTMLRewrite.cpp')
-rw-r--r--lib/Rewrite/HTMLRewrite.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Rewrite/HTMLRewrite.cpp b/lib/Rewrite/HTMLRewrite.cpp
index 67afc08b9f..a605a1e665 100644
--- a/lib/Rewrite/HTMLRewrite.cpp
+++ b/lib/Rewrite/HTMLRewrite.cpp
@@ -31,8 +31,8 @@ using namespace clang;
void html::HighlightRange(Rewriter &R, SourceLocation B, SourceLocation E,
const char *StartTag, const char *EndTag) {
SourceManager &SM = R.getSourceMgr();
- B = SM.getLogicalLoc(B);
- E = SM.getLogicalLoc(E);
+ B = SM.getInstantiationLoc(B);
+ E = SM.getInstantiationLoc(E);
unsigned FileID = SM.getCanonicalFileID(B);
assert(SM.getCanonicalFileID(E) == FileID && "B/E not in the same file!");
@@ -442,8 +442,8 @@ void html::HighlightMacros(Rewriter &R, unsigned FileID, Preprocessor& PP) {
continue;
}
- // Ignore tokens whose logical location was not the main file.
- SourceLocation LLoc = SourceMgr.getLogicalLoc(Tok.getLocation());
+ // Ignore tokens whose instantiation location was not the main file.
+ SourceLocation LLoc = SourceMgr.getInstantiationLoc(Tok.getLocation());
std::pair<unsigned, unsigned> LLocInfo =
SourceMgr.getDecomposedFileLoc(LLoc);
@@ -476,7 +476,7 @@ void html::HighlightMacros(Rewriter &R, unsigned FileID, Preprocessor& PP) {
// instantiation. It would be really nice to pop up a window with all the
// spelling of the tokens or something.
while (!Tok.is(tok::eof) &&
- SourceMgr.getLogicalLoc(Tok.getLocation()) == LLoc) {
+ SourceMgr.getInstantiationLoc(Tok.getLocation()) == LLoc) {
// Insert a newline if the macro expansion is getting large.
if (LineLen > 60) {
Expansion += "<br>";