[PATCH] D52721: [Preprocessor] Fix a crash when handling non-alpha include header.
Kristina Brooks via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 1 05:24:52 PDT 2018
kristina added inline comments.
================
Comment at: lib/Lex/PPDirectives.cpp:1892
if (!File) {
- while (!isAlphanumeric(Filename.front())) {
+ while (!Filename.empty() && !isAlphanumeric(Filename.front())) {
Filename = Filename.drop_front();
----------------
This line is tripping the assert, it seems best course of action would be a single check here and then just diagnosing an error unless you have managed to find other cases, in which case all the checks below are also warranted.
Repository:
rC Clang
https://reviews.llvm.org/D52721
More information about the cfe-commits
mailing list