Browse Source

Run the CheckAbiParameters pass after CheckOperatorsOverloadsPass since the latter can change the signature of the methods which can affect the correctness of the first pass.

pull/28/head
triton 12 years ago
parent
commit
ebde1312c2
  1. 11
      src/Generator/Generators/CSharp/CSharpGenerator.cs

11
src/Generator/Generators/CSharp/CSharpGenerator.cs

@ -1,8 +1,6 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using CppSharp.AST; using CppSharp.AST;
using CppSharp.Passes; using CppSharp.Passes;
using CppSharp.Generators;
namespace CppSharp.Generators.CSharp namespace CppSharp.Generators.CSharp
{ {
@ -28,8 +26,13 @@ namespace CppSharp.Generators.CSharp
public override bool SetupPasses() public override bool SetupPasses()
{ {
Driver.AddTranslationUnitPass(new CheckAbiParameters(Driver.Options)); // Both the CheckOperatorsOverloadsPass and CheckAbiParameters can
// create and and new parameters to functions and methods. Make sure
// CheckAbiParameters runs last because hidden structure parameters
// should always occur first.
Driver.AddTranslationUnitPass(new CheckOperatorsOverloadsPass()); Driver.AddTranslationUnitPass(new CheckOperatorsOverloadsPass());
Driver.AddTranslationUnitPass(new CheckAbiParameters(Driver.Options));
return true; return true;
} }

Loading…
Cancel
Save