[all-commits] [llvm/llvm-project] 5a6dac: LiteralSupport: Don't assert() on invalid input
Daan De Meyer via All-commits
all-commits at lists.llvm.org
Wed Nov 17 15:51:47 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5a6dac66db67225e2443f4e61dfe9d2f96780611
https://github.com/llvm/llvm-project/commit/5a6dac66db67225e2443f4e61dfe9d2f96780611
Author: Daan De Meyer <daan.j.demeyer at gmail.com>
Date: 2021-11-17 (Wed, 17 Nov 2021)
Changed paths:
M clang/include/clang/Basic/DiagnosticLexKinds.td
M clang/lib/Lex/LiteralSupport.cpp
Log Message:
-----------
LiteralSupport: Don't assert() on invalid input
When using clangd, it's possible to trigger assertions in
NumericLiteralParser and CharLiteralParser when switching git branches.
This commit removes the initial asserts on invalid input and replaces
those asserts with the error handling mechanism from those respective
classes instead. This allows clangd to gracefully recover without
crashing.
See https://github.com/clangd/clangd/issues/888 for more information
on the clangd crashes.
More information about the All-commits
mailing list