diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-12-09 23:35:36 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-12-09 23:35:36 +0000 |
| commit | 9c7bd2f535b1f598f14b85880f1deffef886af2f (patch) | |
| tree | f54f29f9b0bcda8cc38d63ed6a937020aee0b95b /clang/lib/Lex | |
| parent | 7365a2838b078bc49945e024cb3f14ec383fd302 (diff) | |
| download | bcm5719-llvm-9c7bd2f535b1f598f14b85880f1deffef886af2f.tar.gz bcm5719-llvm-9c7bd2f535b1f598f14b85880f1deffef886af2f.zip | |
Don't crash when code-completing after "#include <". It would be far
better to actually produce a decent set of completions by checking the
system include paths, but not today. Fixes PR8744.
llvm-svn: 121431
Diffstat (limited to 'clang/lib/Lex')
| -rw-r--r-- | clang/lib/Lex/PPDirectives.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index ee8883b8b26..3414c27bfc8 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -1046,6 +1046,12 @@ bool Preprocessor::ConcatenateIncludeName( while (CurTok.isNot(tok::eom)) { End = CurTok.getLocation(); + // FIXME: Provide code completion for #includes. + if (CurTok.is(tok::code_completion)) { + Lex(CurTok); + continue; + } + // Append the spelling of this token to the buffer. If there was a space // before it, add it now. if (CurTok.hasLeadingSpace()) |

