Reverse Interop: Class declarations

Generate class declarations for Carbon classes referenced from C++
This commit is contained in:
David Blaikie
2026-03-24 12:43:46 +00:00
parent 801785ec39
commit eb62070a01
3 changed files with 118 additions and 19 deletions
@@ -14,6 +14,8 @@
package Other;
namespace Nested;
namespace Nested.Again;
class Class1;
// --- namespace.carbon
library "[[@TEST_NAME]]";
@@ -23,4 +25,14 @@ import Cpp inline '''
namespace X = Carbon::Other;
namespace Y = Carbon::Other::Nested;
namespace Z = Carbon::Other::Nested::Again;
Carbon::Other::Class1 *glbl;
template<typename T> void f1() {
T* v;
}
void f2() {
f1<Carbon::Other::Class1>();
}
''';