Skip to content

Commit 6f5a46d

Browse files
committed
Misc changes/fixes
1 parent 9621e88 commit 6f5a46d

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

src/Core/Diagnostics.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ public void Emit(DiagnosticInfo info)
128128
{
129129
Console.WriteLine(message);
130130
}
131-
Debug.WriteLine(message);
131+
132+
// Don't output debug messages to VS output window. This is extremely slow.
133+
if (info.Kind > DiagnosticKind.Debug)
134+
Debug.WriteLine(message);
132135
}
133136

134137
public void PushIndent(int level)

src/CppParser/Bootstrap/StmtCodeGenerators.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ public override bool VisitProperty(Property property)
344344
{
345345
var expr = $"_S->{fieldName} = static_cast<AST::{typeName}>(WalkExpression(S->{methodName}()));";
346346

347-
if (fieldName == "base" && typeName is "CXXDependentScopeMemberExpr")
347+
if (fieldName == "base" && @class.Name == "CXXDependentScopeMemberExpr")
348348
{
349349
// Clang asserts that 'getBase()' is not called when 'isImplicitAccess()' returns true
350350
WriteLine("if (!S->isImplicitAccess())");

src/Generator/Types/Std/Stdlib.CSharp.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,13 @@ public override Type SignatureType(TypePrinterContext ctx)
307307
{
308308
if (ctx.Kind == TypePrinterContextKind.Managed)
309309
return new CILType(typeof(string));
310+
310311
var typePrinter = new CSharpTypePrinter(null);
311312
typePrinter.PushContext(TypePrinterContextKind.Native);
313+
312314
if (ctx.Type.Desugar().IsAddress())
313315
return new CustomType(typePrinter.IntPtrType);
316+
314317
ClassTemplateSpecialization basicString = GetBasicString(ctx.Type);
315318
return new CustomType(basicString.Visit(typePrinter).Type);
316319
}

tests/dotnet/Common/Common.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#include "../Tests.h"
1+
#pragma once
2+
#include "../Tests.h"
23
#include "AnotherUnit.h"
34

45
#ifdef _WIN32

0 commit comments

Comments
 (0)