Browse Source

Enabling empty arrays of non-primitives only when not using MSVC.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/934/head
Dimitar Dobrev 8 years ago
parent
commit
358650a155
  1. 4
      src/Generator/Passes/CheckIgnoredDecls.cs
  2. 2
      tests/Common/Common.h

4
src/Generator/Passes/CheckIgnoredDecls.cs

@ -302,7 +302,7 @@ namespace CppSharp.Passes
return false; return false;
} }
if (HasInvalidType(variable.Type, variable.TranslationUnit.Module, out msg)) if (HasInvalidType(variable.Type, variable, out msg))
if (HasInvalidType(variable, out msg)) if (HasInvalidType(variable, out msg))
{ {
@ -339,7 +339,7 @@ namespace CppSharp.Passes
return false; return false;
} }
if (HasInvalidType(param.Type, @event.TranslationUnit.Module, out msg)) if (HasInvalidType(param.Type, param, out msg))
if (HasInvalidType(param, out msg)) if (HasInvalidType(param, out msg))
{ {

2
tests/Common/Common.h

@ -711,8 +711,10 @@ class DLL_API TestFixedArrays
public: public:
TestFixedArrays(); TestFixedArrays();
VoidPtrRetFunctionTypedef Array[10]; VoidPtrRetFunctionTypedef Array[10];
#ifndef _MSC_VER
TestWideStrings ZeroSizedClassArray[0]; TestWideStrings ZeroSizedClassArray[0];
MyEnum ZeroSizedEnumArray[0]; MyEnum ZeroSizedEnumArray[0];
#endif
int ZeroSizedArray[0]; int ZeroSizedArray[0];
}; };

Loading…
Cancel
Save