Skip to content

Rewriting error on inline structure definition #468

Closed
@john-h-kastner

Description

@john-h-kastner

An assertion fail while rewriting this with-alltypes. It looks like this happen when we try to rewrite a source range where the start SourceLocation comes after the end SourceLocation.

void a() {
  struct {int i;} *b;
}
3c:  clang/lib/Rewrite/RewriteRope.cpp:380: void {anonymous}::RopePieceBTreeLeaf::erase(unsigned int, unsigned int): Assertion `getPiece(StartPiece).size() > NumBytes' failed.

This error causes the -alltypes conversion of libarchive to fail.

Metadata

Metadata

Assignees

Labels

benchmark failureA bug causing a failure in our nightly benchmark testsrewriter

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions