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();
----------------
kristina wrote:
> 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.
In either case, the diagnostic emitted doesn't really make sense, at least to 
me, I think it would be better to explicitly diagnose this case as an error and 
then bail, before an assertion fires.

I also crashed clang with `#include "./"`, so the test case does seem to be 
fairly minimal which is good. Though I think a diagnostic about a bogus file 
path would be better (I don't know how to word it well), rather than saying 
file not found.


Repository:
  rC Clang

https://reviews.llvm.org/D52721



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to