[Preprocessor] Fix a crash when handling non-alpha include header.
authorHaojian Wu <hokein@google.com>
Mon, 1 Oct 2018 14:38:43 +0000 (14:38 +0000)
committerHaojian Wu <hokein@google.com>
Mon, 1 Oct 2018 14:38:43 +0000 (14:38 +0000)
commit1743ebe369f94289d418dd67b18aec26f2ef10b2
treecb6ccded505882f1e9f75f203427eabf73906e4c
parent22ae8dabb54778f6819a0874a1f7545c180cfa27
[Preprocessor] Fix a crash when handling non-alpha include header.

Summary: the crash is casued by an assertion in StringRef.
(llvm::StringRef::front() const: Assertion `!empty()' failed.)

Reviewers: sammccall

Subscribers: jsji, cfe-commits

Differential Revision: https://reviews.llvm.org/D52721

llvm-svn: 343481
clang/lib/Lex/PPDirectives.cpp
clang/test/Preprocessor/include-nonalpha-no-crash.c [new file with mode: 0644]