[clang] [clang][ASTImporter] New fix for default template parameter values. (PR #101836)

Balázs Kéri via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 3 09:29:32 PDT 2024


================
@@ -9919,6 +9919,103 @@ TEST_P(ImportTemplateParmDeclDefaultValue, ImportExistingVarTemplate) {
   testImport(FromLastD);
 }
 
+TEST_P(ImportTemplateParmDeclDefaultValue,
+       ImportParentTemplateDuringNonTypeTemplateParmDecl) {
+  // This wants to provoke that during import of 'Y' in "typename T = Y"
+  // (before this import returns) the later definition of 'X' is imported fully.
----------------
balazske wrote:

This comment is not accurate, I will remove it.
What exactly should happen:

1. import first `struct X` declaration
3. start import of second `int P`
4. finish import of second `struct X`, this will set `int P` to "inherited"
5. import (visit) function for importing second `int P` returns


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


More information about the cfe-commits mailing list