Skip to content
Commit 91b7952a authored by dingfei's avatar dingfei
Browse files

[ASTImporter] Fix corrupted RecordLayout caused by circular referenced fields

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)).

Use UnaryOperator::CreateEmpty() instead of UnaryOperator::Create()
to avoid this computation.

Fixes https://github.com/llvm/llvm-project/issues/64170

Reviewed By: aaron.ballman, balazske, shafik

Differential Revision: https://reviews.llvm.org/D156201
parent 5f2157f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment