History log of /external/clang/test/Parser/MicrosoftExtensions.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
563a645de82231a55e221fe655b7188bf8369662 25-May-2011 Francois Pichet <pichet2000@gmail.com> Add support for Microsoft __if_exists, __if_not_exists extension at class scope.

Example:

typedef int TYPE;
class C {
__if_exists(TYPE) {
TYPE a;
}
__if_not_exists(TYPE) {
this will never be parsed.
}
};


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp
6a24747beed797b2f1184c66ca45beb4db20eb08 11-May-2011 Francois Pichet <pichet2000@gmail.com> In Microsoft mode, allow pure specifier (=0) on inline functions declared at class scope.
This removes 2 errors when parsing MFC code with clang

Example:
class A {
virtual void f() = 0 { }
}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131175 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp
20e3c9ed21b47c3b6d1d82df84db357600bacc06 10-May-2011 Francois Pichet <pichet2000@gmail.com> Add a __uuidof test where the uuid attribute is on the second declaration.
Also some -fdelayed-template-parsing test refactoring.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp
a23ae3f45789f40cdfd939117284f977d2dc17a6 07-May-2011 Francois Pichet <pichet2000@gmail.com> 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
/external/clang/test/Parser/MicrosoftExtensions.cpp
f986038beed360c031de8654cfba43a5d3184605 07-May-2011 Francois Pichet <pichet2000@gmail.com> Add support for _if_exists and __if_not_exists at namespace/global scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp
1e862693c63067ae467b0b3884c44f753cd6e821 06-May-2011 Francois Pichet <pichet2000@gmail.com> Add support for Microsoft __if_exists and __if_not_exists construct inside function definition.
Allow to include or exclude code depending on if a symbol exists or not. Just like a #ifdef but for C/C++ symbols.

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

Support at class and namespace scopes will be added later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp
a343a415035aba553a5c21fad8fba6a6db83e0f9 29-Apr-2011 Francois Pichet <pichet2000@gmail.com> r130381 follow up: accept __uuidof expression for template argument reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp
a97d24f2ca50f318f62a6cf2a621e7842dd63b4a 28-Apr-2011 Francois Pichet <pichet2000@gmail.com> Support &__uuidof(type) as a non type template argument.
This idiom is used everywhere in MFC/COM code and as such this patch removes hundreds of errors when parsing MFC code with clang.

Example:
template <class T, const GUID* g = &__uuidof(T)>
class ComTemplate { };

typedef ComTemplate<struct_with_uuid, &__uuidof(struct_with_uuid)> COM_TYPE;

Of course this is just parsing support. Trying to use this in CodeGen will generate:
error: cannot yet mangle expression type CXXUuidofExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp
338d7f7362d18fa9c39c6bb5282b4e20574a9309 28-Apr-2011 Francois Pichet <pichet2000@gmail.com> Upgrade Microsoft's __int8, __int16, __int32 and __int64 types from builtin defines to real types.

Otherwise statements like:
__int64 var = __int64(0);

would be expanded to:
long long var = long long(0);

and fail to compile.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp
0047012d99e9f80e242f9dbbc374049d478ffc6f 27-Apr-2011 Francois Pichet <pichet2000@gmail.com> Add support for Microsoft __interface keyword. An __interface class is basically a normal class containing just pure virtual functions. No urgency to enforce that restriction in clang for now, so make __interface an "class" alias.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp
a5d318ad4ad3a110b3abb34f765e69b76f7c0bcd 24-Apr-2011 Francois Pichet <pichet2000@gmail.com> Downgrade unnecessary "typename" from error to warning in Microsoft mode.
This fixes 1 error when parsing MSVC 2008 headers with clang.

Must "return true;" even if it is a warning because the rest of the code path assumes that SS is set to something. The parser will get back on its feet and continue parsing the rest of the declaration correctly so it is not a problem.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp
4147d307086cf024a40a080e2bf379e9725f6f41 27-Mar-2011 Francois Pichet <pichet2000@gmail.com> Improve recovery (error + fix-it) when parsing type dependent template name without the "template" keyword.

For example:
typename C1<T>:: /*template*/ Iterator<0> pos;

Also the error is downgraded to an ExtWarn in Microsoft mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128387 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp
dfaa5fb15da115315513ce356169450a5963977f 31-Jan-2011 Francois Pichet <pichet2000@gmail.com> Allow Microsoft attributes in a constructor's parameter list.
This fixes a few compile errors when parsing <regex> from MSVC 2008 with clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp
dbee3411a22b0dbb03267f5445f7b796104991bb 18-Jan-2011 Francois Pichet <pichet2000@gmail.com> Add support for explicit constructor calls in Microsoft mode.
For example:

class A{
public:
A& operator=(const A& that) {
if (this != &that) {
this->A::~A();
this->A::A(that); // <=== explicit constructor call.
}
return *this;
}
};

More work will be needed to support an explicit call to a template constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp
6915c529dbb43073dad148c2e83a1c56bfcc05c8 27-Dec-2010 Francois Pichet <pichet2000@gmail.com> More __uuidof validation:
1. Do not validate for uuid attribute if the type is template dependent.
2. Search every class declaration and definition for the uuid attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp
913b7bf8c40454641588611b7bbad981dc53c882 20-Dec-2010 Francois Pichet <pichet2000@gmail.com> Emit an error if operator __uuidof() is called on a type with no associated GUID.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp
141ecfeeb54948159facce6aeb586e2f6c406f78 12-Oct-2010 Nick Lewycky <nicholas@mxc.ca> Replace \r\n with \n in this file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp
334d47e92e9f241576fdeb7477b69a03136ba854 11-Oct-2010 Francois Pichet <pichet2000@gmail.com> Add parsing support for Microsoft attributes. MS attributes will just be skipped and not inserted into the AST for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Parser/MicrosoftExtensions.cpp