[all-commits] [llvm/llvm-project] 3bace7: [LLVM][AsmParser] Make error reporting of lexer er...
Rahul Joshi via All-commits
all-commits at lists.llvm.org
Mon Oct 7 14:02:50 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3bace7efe00cbc5caadd2926027f4675845f06a8
https://github.com/llvm/llvm-project/commit/3bace7efe00cbc5caadd2926027f4675845f06a8
Author: Rahul Joshi <rjoshi at nvidia.com>
Date: 2024-10-07 (Mon, 07 Oct 2024)
Changed paths:
M llvm/include/llvm/AsmParser/LLLexer.h
M llvm/include/llvm/AsmParser/LLParser.h
M llvm/lib/AsmParser/LLLexer.cpp
M llvm/lib/AsmParser/LLParser.cpp
M llvm/test/Assembler/allockind-missing.ll
M llvm/test/Assembler/invalid-inttype.ll
M llvm/test/Assembler/invalid-landingpad.ll
M llvm/test/Assembler/invalid-name.ll
M llvm/test/Assembler/invalid-name2.ll
Log Message:
-----------
[LLVM][AsmParser] Make error reporting of lexer errors more precise (#111077)
When the lexer hits an error during assembly parsing, it just logs the
error in the `ErrorMsg` object, and it's possible that error gets
overwritten later in by the parser with a more generic error message.
This makes some errors reported by the LLVM's asm parser less precise.
Address this by not having the parser overwrite the message logged by
the lexer by assigning error messages generated by the lexer higher
"priority" than those generated by parser and overwriting the error
message only if its same or higher priority.
Update several Assembler unit test to now check the more precise error
messaged reported by the LLVM's AsmParser.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list