summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/MicrosoftExtensions.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* In Microsoft mode, allow pure specifier (=0) on inline functions declared at ↵Francois Pichet2011-05-111-0/+5
| | | | | | | | | | | | | class scope. This removes 2 errors when parsing MFC code with clang Example: class A { virtual void f() = 0 { } } llvm-svn: 131175
* Add a __uuidof test where the uuid attribute is on the second declaration. Francois Pichet2011-05-101-7/+17
| | | | | | Also some -fdelayed-template-parsing test refactoring. llvm-svn: 131113
* Temporary preprocessor hack to get around the Microsoft __identifier(x) ↵Francois Pichet2011-05-071-0/+3
| | | | | | | | | | | 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. llvm-svn: 131051
* Add support for _if_exists and __if_not_exists at namespace/global scope.Francois Pichet2011-05-071-6/+16
| | | | llvm-svn: 131050
* Add support for Microsoft __if_exists and __if_not_exists construct inside ↵Francois Pichet2011-05-061-0/+33
| | | | | | | | | | | | 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. llvm-svn: 131014
* r130381 follow up: accept __uuidof expression for template argument reference.Francois Pichet2011-04-291-0/+3
| | | | llvm-svn: 130491
* Support &__uuidof(type) as a non type template argument.Francois Pichet2011-04-281-0/+7
| | | | | | | | | | | | | | | 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 llvm-svn: 130381
* Upgrade Microsoft's __int8, __int16, __int32 and __int64 types from builtin ↵Francois Pichet2011-04-281-1/+3
| | | | | | | | | | | | | | 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. llvm-svn: 130369
* Add support for Microsoft __interface keyword. An __interface class is ↵Francois Pichet2011-04-271-0/+5
| | | | | | 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. llvm-svn: 130290
* Downgrade unnecessary "typename" from error to warning in Microsoft mode. Francois Pichet2011-04-241-0/+12
| | | | | | | | 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. llvm-svn: 130088
* Improve recovery (error + fix-it) when parsing type dependent template name ↵Francois Pichet2011-03-271-0/+24
| | | | | | | | | | | without the "template" keyword. For example: typename C1<T>:: /*template*/ Iterator<0> pos; Also the error is downgraded to an ExtWarn in Microsoft mode. llvm-svn: 128387
* Allow Microsoft attributes in a constructor's parameter list.Francois Pichet2011-01-311-0/+8
| | | | | | This fixes a few compile errors when parsing <regex> from MSVC 2008 with clang. llvm-svn: 124573
* Add support for explicit constructor calls in Microsoft mode.Francois Pichet2011-01-181-0/+18
| | | | | | | | | | | | | | | | | | | 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. llvm-svn: 123735
* More __uuidof validation:Francois Pichet2010-12-271-0/+16
| | | | | | | 1. Do not validate for uuid attribute if the type is template dependent. 2. Search every class declaration and definition for the uuid attribute. llvm-svn: 122578
* Emit an error if operator __uuidof() is called on a type with no associated ↵Francois Pichet2010-12-201-1/+47
| | | | | | GUID. llvm-svn: 122226
* Replace \r\n with \n in this file.Nick Lewycky2010-10-121-25/+25
| | | | llvm-svn: 116312
* Add parsing support for Microsoft attributes. MS attributes will just be ↵Francois Pichet2010-10-111-0/+25
skipped and not inserted into the AST for now. llvm-svn: 116203
OpenPOWER on IntegriCloud