From c2cbfe55c77b075ba73401e76b81c040a3ac99cd Mon Sep 17 00:00:00 2001 From: Alexandre Mutel Date: Tue, 20 Aug 2024 07:56:20 +0200 Subject: [PATCH] Fix access to cppClass.FullName in debug that could fail (#106) --- src/CppAst/CppModelBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CppAst/CppModelBuilder.cs b/src/CppAst/CppModelBuilder.cs index dca8a06..67be6bd 100644 --- a/src/CppAst/CppModelBuilder.cs +++ b/src/CppAst/CppModelBuilder.cs @@ -220,7 +220,7 @@ private CppContainerContext GetOrCreateDeclarationContainer(CXCursor cursor, voi break; default: { - Debug.WriteLine($"[Warning]template argument in class:{cppClass.FullName} with type: {arg.kind} do not handle right now!"); + RootCompilation.Diagnostics.Warning($"Unhandled template argument with type {arg.kind}: {cursor.Kind}/{CXUtil.GetCursorSpelling(cursor)}", GetSourceLocation(cursor.Location)); cppClass.TemplateSpecializedArguments.Add(new CppTemplateArgument(tempParams[(int)i], arg.ToString())); } break;