Skip to content

[ASTImporter] Circular referenced fields renders corrupted layout and cached #64170

@danix800

Description

@danix800

UnaryOperator(&)'s creation might need layout of some records
whose fields importation are still on fly, the layout is incorrectly
computed and cached. Clients relying on this will not work properly
or crash direclty (e.g StaticAnalyzer's MemRegion.cpp (calculateOffset)).

      class B;
      class A {
        B* b;
        int c;
      };
      class B {
        A *f() { return &((B *)0)->a; }
        A a;
      };

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions