Skip to content
Snippets Groups Projects
Commit a23ae3f4 authored by Francois Pichet's avatar Francois Pichet
Browse files

Temporary preprocessor hack to get around the Microsoft __identifier(x) extension.

http://msdn.microsoft.com/en-us/library/hzc8ytsz(v=VS.100).aspx

Microsoft doc claims this is a C++/CLI feature but it is really always enabled.
This removes 2 error when parsing MFC code with clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131051 91177308-0d34-0410-b5e6-96231b3b80d8
parent f986038b
No related branches found
No related tags found
No related merge requests found
...@@ -343,6 +343,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI, ...@@ -343,6 +343,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
// Since we define wchar_t in C++ mode. // Since we define wchar_t in C++ mode.
Builder.defineMacro("_WCHAR_T_DEFINED"); Builder.defineMacro("_WCHAR_T_DEFINED");
Builder.defineMacro("_NATIVE_WCHAR_T_DEFINED"); Builder.defineMacro("_NATIVE_WCHAR_T_DEFINED");
Builder.append("#define __identifier(x) x");
Builder.append("class type_info;"); Builder.append("class type_info;");
} }
......
...@@ -207,3 +207,6 @@ __if_not_exists(IF_EXISTS::Type) { ...@@ -207,3 +207,6 @@ __if_not_exists(IF_EXISTS::Type) {
__if_not_exists(IF_EXISTS::Type_not) { __if_not_exists(IF_EXISTS::Type_not) {
int var244; int var244;
} }
int __identifier(generic) = 3;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment