diff options
Diffstat (limited to 'lib/Lex/PPDirectives.cpp')
-rw-r--r-- | lib/Lex/PPDirectives.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index 70302f10ae..ccbee631ae 100644 --- a/lib/Lex/PPDirectives.cpp +++ b/lib/Lex/PPDirectives.cpp @@ -1296,9 +1296,6 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, case tok::string_literal: Filename = getSpelling(FilenameTok, FilenameBuffer); End = FilenameTok.getLocation(); - // For an angled include, point the end location at the closing '>'. - if (FilenameTok.is(tok::angle_string_literal)) - End = End.getLocWithOffset(Filename.size()-1); CharEnd = End.getLocWithOffset(Filename.size()); break; @@ -1388,8 +1385,9 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, } // Notify the callback object that we've seen an inclusion directive. - Callbacks->InclusionDirective(HashLoc, IncludeTok, Filename, isAngled, File, - End, SearchPath, RelativePath); + Callbacks->InclusionDirective(HashLoc, IncludeTok, Filename, isAngled, + CharSourceRange::getCharRange(FilenameTok.getLocation(), CharEnd), + File, SearchPath, RelativePath); } if (File == 0) { |