Skip to content

Instantly share code, notes, and snippets.

View tritao's full-sized avatar
🎯
Focusing

João Matos tritao

🎯
Focusing
  • Portugal
View GitHub Profile
@tritao
tritao / libclang-NameMangling.patch
Created May 22, 2012 03:15
libclang Name Mangling API
Index: include/clang-c/Index.h
===================================================================
--- include/clang-c/Index.h (revision 156043)
+++ include/clang-c/Index.h (working copy)
@@ -4737,10 +4737,32 @@
* @}
*/
+/** \defgroup CINDEX_MANGLE Name Mangling API Functions
+ *
@tritao
tritao / cli.cpp
Created April 29, 2013 18:23
C++/CLI examples
#define CLI_TESTS 1
#define CLI_TESTS_FORM 1
#if 1
#using <mscorlib.dll>
using namespace System;
using namespace System::Text;
using namespace System::Collections::Generic;
#ifdef CLI_TESTS_FORM
@tritao
tritao / Clang.natvis
Created November 5, 2013 01:17
LLVM & Clang Natvis
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="clang::Stmt">
<Expand>
<Item Name="Statement Class">(Stmt::StmtClass)StmtBits.sClass</Item>
</Expand>
</Type>
<Type Name="clang::Expr">
<Expand>
@tritao
tritao / DependentTypes.patch
Created December 5, 2013 07:07
CppSharp dependent types fix
58bc07661c287b097c4bd99d24ab2387c8057a4c
src/Generator/Generators/CLI/CLIMarshal.cs | 4 ++--
src/Generator/Generators/CSharp/CSharpMarshal.cs | 10 ++++++++++
src/Parser/Parser.cpp | 10 +++-------
3 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/src/Generator/Generators/CLI/CLIMarshal.cs b/src/Generator/Generators/CLI/CLIMarshal.cs
index 03977ec..ab36a7b 100644
--- a/src/Generator/Generators/CLI/CLIMarshal.cs
+++ b/src/Generator/Generators/CLI/CLIMarshal.cs
@tritao
tritao / gist:8ff89dd1904e051616b0
Created May 3, 2014 22:44
SharpCompress VS2012 error
1>------ Build started: Project: SharpCompress, Configuration: Debug Any CPU ------
2>------ Build started: Project: SharpCompress.PortableTest, Configuration: Debug Any CPU ------
3>------ Build started: Project: SharpCompress.Portable, Configuration: Debug Any CPU ------
4>------ Build started: Project: SharpCompress.NET2, Configuration: Debug Any CPU ------
1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2482,5): error MSB3325: Cannot import the following key file: SharpCompress.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_BBC50E367AC04F61
1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2482,5): error MSB3321: Importing key file "SharpCompress.pfx" was canceled.
4>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not
From 643e7935a806b2fc59c3908ebb49f61972ab0ba0 Mon Sep 17 00:00:00 2001
From: triton <ripzonetriton@gmail.com>
Date: Sun, 4 May 2014 18:13:54 +0100
Subject: [PATCH 2/2] Added stdcall delegate tests.
---
tests/Basic/Basic.Tests.cs | 5 ++++-
tests/Basic/Basic.h | 3 +++
tests/Tests.h | 2 ++
3 files changed, 9 insertions(+), 1 deletion(-)
From 98ccb772b3edfa0c1c03bb4a5b23c730c2937f76 Mon Sep 17 00:00:00 2001
From: triton <joao@tritao.eu>
Date: Thu, 8 May 2014 15:14:44 +0100
Subject: [PATCH 2/2] Misc changes
---
build/LLVM.lua | 1 +
src/AST/Template.cs | 6 +++-
src/Core/Parser/ASTConverter.cs | 10 ++++--
src/CppParser/AST.cpp | 25 ++++++++++++++
From 3d4770b760da036e27e9bd8528dd42f8282609de Mon Sep 17 00:00:00 2001
From: triton <joao@tritao.eu>
Date: Sun, 11 May 2014 21:52:25 +0100
Subject: [PATCH] Improved template parsing error handling.
For an example of what can trigger it:
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_string;
@tritao
tritao / gist:a775ba9daa3ccbd79423
Created May 29, 2014 11:14
Difference in behavior from MS and Mono's C# compilers
/**
C:\Development>mcs dev.cs
dev.cs(8,18): warning CS0649: Field `WindowsIdentity._type' is never assigned to, and will always have its default value `null'
Compilation succeeded - 1 warning(s)
C:\Development>csc /nologo dev.cs
dev.cs(14,17): error CS0546: 'WindowsIdentity.AuthenticationType.set': cannot override because 'ClaimsIdentity.AuthenticationType' does not have an
overridable set accessor
dev.cs(3,24): (Location of symbol related to previous error)
*/
<ItemGroup>
<CustomBuild Include="..\..\..\mcs\mcs\cs-parser.jay">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"lib\jay" -cv &lt; "../../../mcs/jay/skeleton.cs" "../../../mcs/mcs/cs-parser.jay" &gt; gen/cs-parser.cs</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../gen/cs-parser.cs</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"lib\jay" -cv &lt; "../../../mcs/jay/skeleton.cs" "../../../mcs/mcs/cs-parser.jay" &gt; gen/cs-parser.cs</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">../gen/cs-parser.cs</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"lib\jay" -cv &lt; "../../../mcs/jay/skeleton.cs" "../../../mcs/mcs/cs-parser.jay" &gt; gen/cs-parser.cs</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../gen/cs-parser.cs</Outputs>
<Command Condition="'$(Configuration