Switch from llvm::errs()+exit() to FATAL_USER_ERROR() stream-based handling. (#670)

This is intended to:

- Standardize use of line_num (and highlight where no line_num is available).
- Standardize indications of runtime/compilation errors.
- Make it incrementally easier to write new errors.

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
This commit is contained in:
Jon Meow
2021-07-28 10:47:33 -07:00
committed by GitHub
co-authored by Chandler Carruth
parent dcc694c2e0
commit f0af3cb795
24 changed files with 206 additions and 170 deletions
+2 -3
View File
@@ -169,9 +169,8 @@ auto Expression::MakeTupleLiteral(int line_num,
for (auto& arg : args) {
if (arg.name == "") {
if (seen_named_member) {
FatalUserError()
<< line_num
<< ": positional members must come before named members";
FATAL_USER_ERROR(line_num)
<< "positional members must come before named members";
}
arg.name = std::to_string(i);
++i;