A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/llvm/llvm-project/issues/56560 below:

Clang crashes when parsing operator== for an enum parameter with a bool enum base and no enumerator list · Issue #56560 · llvm/llvm-project · GitHub

llvm commit I have checked out where this is broken (not necessarily the cause): 4a40fa8

Repro steps

test.cpp:

enum Foo : bool;

bool bar(Foo a, Foo b) {
    return a == b;
}
  1. Build Clang with LLVM_ENABLE_ASSERTIONS:BOOL=ON
  2. Run clang++ -c test.cpp -o test

Expected result:
clang should compile the file

Actual result:

clang crashes with the assertion

clang++: /path/to/llvm/repo/llvm-project/clang/lib/AST/Expr.cpp:1836: bool clang::CastExpr::CastConsistency() const: Assertion `!getType()->isBooleanType() && "unheralded conversion to bool"' failed.

The full stacktrace is in the attached stacktrace.txt.

(I had to change the extension of the .cpp file and the .sh file as GitHub doesn't support those file type extensions as attachments)

stacktrace.txt
test-f893c2.cpp.txt
test-f893c2.sh.txt


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4