hsutter / cppfront

A personal experimental C++ Syntax 2 -> Syntax 1 compiler
Other
5.23k stars 224 forks source link

[BUG] Assert failed, file to_cpp1.h, line 6722. #1123

Closed MarekKnapek closed 1 week ago

MarekKnapek commented 2 weeks ago

Describe the bug File to_cpp1.h. Line 6722. Expression assert(n.initializer);.

To Reproduce Steps to reproduce the behavior:

  1. Download source code of cppfront.
  2. Compile cppfront.
  3. Run cppfront on test.cpp2 file.
  4. Assert triggers inside cppfront.

Additional context Test.cpp2 file's content is only 3 bytes long and it is: r:;.

gregmarr commented 2 weeks ago

Confirmed on cpp2.godbolt.org

MaxSagebaum commented 1 week ago

Confirmed on cpp2.godbolt.org

Why not post the short link?

sookach commented 1 week ago

Confirmed on cpp2.godbolt.org

Why not post the short link?

link

gregmarr commented 1 week ago

Why not post the short link?

It's literally three characters in the source, seemed like a waste to have it create and store the short link.