[clang] [clang][ASTImporter] Link FunctionDecl into its DeclContext before importing its body (PR #214009)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 7 04:09:36 PDT 2026


steakhal wrote:

ASTImporter fixes usually use unittests. The patches to `clang/lib/AST/ASTImporter.cpp` that were marked with the `[ASTImporter]` since 2025.12 were these:
- e9cf47b69bd791c70ee15f23f71e0af4d2037ab2
- a31aee779b519552d24a5c043fb7ffd29ad87488
- c15a6cc00b1a0e3a47d99172b839ec45c72168ae
- 51815b18d73e9a9ed021c789319cffdf1f735f3c
- 4b30b3f901b00da1bd1f70e9ca9086e349c7cca0
- 5c5bbffe75caaaefdc68305e85a625a057b09159
- b270525f730be6e7196667925f5a9bfa153262e9
- 7be501c1d3b3153e08603670873e1b3b700c9598

There are exceptions of course that were using LIT tests - similar to what you propose now:
- d06d3a7bdca153c3130704ef115c72095488e1f7
- 8e97f50eed71ff59b5a6fcb31e3e1af3fb30cdb4

Given the numbers, my argument was that you should probably test your ASTImporter changes using unittests.

https://github.com/llvm/llvm-project/pull/214009


More information about the cfe-commits mailing list