diff options
author | Matthias Kramm <kramm@google.com> | 2020-03-03 13:20:48 -0800 |
---|---|---|
committer | River Riddle <riddleriver@gmail.com> | 2020-03-03 13:21:05 -0800 |
commit | cb530ec8b841b8033032a8bf88d93f7d6df2dbe0 (patch) | |
tree | 95aa5d1bfeca85af40a4ff6455a7a01ac42a388c /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | c10896682d0bb457b9d77fdd753ed9e7e6806db1 (diff) | |
download | llvm-cb530ec8b841b8033032a8bf88d93f7d6df2dbe0.zip llvm-cb530ec8b841b8033032a8bf88d93f7d6df2dbe0.tar.gz llvm-cb530ec8b841b8033032a8bf88d93f7d6df2dbe0.tar.bz2 |
[mlir][Tutorial] Make parsing an empty file print a better error.
Summary:
Previously, we would, for an empty file, print the somewhat confusing
Assertion `tok == curTok [...]' failed.
With this change, we now print
Parse error [...]: expected 'def' [...]
This only affects the parser from chapters 1-6, since the more advanced
chapter 7 parser is actually able to generate an empty module from an
empty file. Nonetheless, this commit also adds the additional check to
the chapter 7 parser, for consistency.
Differential Revision: https://reviews.llvm.org/D75534
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions