aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Lex/PPDirectives.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp
index 738bed36ba..70302f10ae 100644
--- a/lib/Lex/PPDirectives.cpp
+++ b/lib/Lex/PPDirectives.cpp
@@ -1296,6 +1296,9 @@ 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;