Clang crashes with "Assertion `!Partition.empty()' failed" when an unparenthesized initializer list is passed to certain macros #60722
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
confirmed
Verified by a second party
crash-on-invalid
Milestone
This was originally reported by Chrome: https://crbug.com/1413180
This reproduces in commit b673135, but I poked around and it seems like this bug has been around for a while.
We (obviously) don't hit this assertion if Clang was built without assertions, but if assertions are disabled, Clang may run out of memory as reported in the Chrome bug.
Repro steps:
Build Clang with assertions enabled.
macro_test.cc
:command:
$ clang++ -fsyntax-only macro_test.cc
Expected behavior:
Clang should emit diagnostics without crashing.
Actual behavior:
Clang emits some diagnostics and then crashes:
diagnostics.tar.gz
The text was updated successfully, but these errors were encountered: