summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/MicrosoftExtensions.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for MSVC __unaligned attribute. Necessary to parse MSVC headers ↵Francois Pichet2011-08-181-0/+4
| | | | | | | | in 64-bit mode (ie: when _M_IA64 or _M_AMD64 is defined) more info: http://msdn.microsoft.com/en-us/library/ms177389.aspx llvm-svn: 137935
* Microsoft friend acting as a forward declaration; try#2. Now only 2 lines.Francois Pichet2011-06-011-1/+26
| | | | llvm-svn: 132387
* Revert 132332 (Microsoft friend as a forward declaration), John McCall ↵Francois Pichet2011-05-311-25/+0
| | | | | | pointed out a better/simpler way to do it. llvm-svn: 132369
* For compatibility with MSVC, a friend declaration also act as a forward ↵Francois Pichet2011-05-311-0/+25
| | | | | | | | | | | | | | declaration if the tag name is not already declared. The tag name is declared in the next outermost non record scope. Example: class A { friend class B; B* b; }; B* global_b; llvm-svn: 132332
* MSVC doesn't do any validation regarding exception specification.Francois Pichet2011-05-241-0/+11
| | | | llvm-svn: 131950
* Emulate a MSVC bug where if during an using declaration name lookup, the ↵Francois Pichet2011-05-231-0/+19
| | | | | | | | | | | | | | | declaration found is unaccessible (private) and that declaration was bring into scope via another using declaration whose target declaration is accessible (public) then no error is generated. Example: class A { public: int f(); }; class B : public A { private: using A::f; }; class C : public B { private: using B::f; }; Here, B::f is private so this should fail in Standard C++, but because B::f refers to A::f which is public MSVC accepts it. This fixes 1 error when parsing MFC code with clang. llvm-svn: 131896
* Revert 131347. It asserts if the specialization in within a class template:Francois Pichet2011-05-141-7/+0
| | | | | | | | | | | | template<class U> struct X1 { template<class T> void f(T*); template<> void f(int*) { } }; Won't be so simple. I need to think more about it. llvm-svn: 131362
* In Microsoft mode, allow template function explicit specialization at class ↵Francois Pichet2011-05-141-0/+7
| | | | | | | | | | | | | | scope. Necessary to parse MFC and MSVC standard lib code. Example: struct X { template<class T> void f(T) { } template<> void f(int) { } } llvm-svn: 131347
* In Microsoft mode, allow conversion from pointer to integral type no matter ↵Francois Pichet2011-05-111-0/+8
| | | | | | | | | | | what size the integral type is. Necessary to parse MFC code. Example: void f(char *ptr) { char var = (char)ptr; } llvm-svn: 131201
* Fix test.Francois Pichet2011-05-081-2/+1
| | | | llvm-svn: 131077
* Allow implicit conversion from function pointer to void* in Microsoft mode. Francois Pichet2011-05-081-1/+11
| | | | | | Necessary to parse MFC code. llvm-svn: 131076
* Downgrade error "static declaration of 'foo' follows non-static declaration" ↵Francois Pichet2011-04-221-0/+12
| | | | | | to a warning in Microsoft mode. llvm-svn: 129985
* In Microsoft mode, within class scope, if a CXXScopeSpec's type is equal to ↵Francois Pichet2011-04-131-0/+32
| | | | | | | | | | | | | | | | | | the type of one of the base classes then downgrade the missing typename error to a warning. Up to now this is the only case I found where MSVC doesn't require "typename" at class scope. Really strange! This fixes 1 error when parsing the MSVC 2008 header files. Example: template<class T> class A { public: typedef int TYPE; }; template<class T> class B : public A<T> { public: A<T>::TYPE a; // no typename required because A<T> is a base class. }; llvm-svn: 129425
* MSVC accepts that default parameters be redefined for member functionsFrancois Pichet2011-04-101-0/+9
| | | | | | | | of template class. The new value is ignored. This fixes 1 error when parsing MSVC 2010 header files with clang. llvm-svn: 129240
* Add a triple to make the test friendly on no windows platform.Francois Pichet2011-03-291-1/+1
| | | | llvm-svn: 128459
* Accept __declspec(dllimport) for function defined at class scope in ↵Francois Pichet2011-03-291-0/+13
| | | | | | | | Microsoft mode. This fixes a bunch of errors when compiling MSVC header files with the -DDLL flag. llvm-svn: 128457
* Downgrade err_mismatched_exception_spec to a ExtWarning in Microsoft mode. ↵Francois Pichet2011-03-191-13/+5
| | | | | | | | MSVC doesn't do any validation on exception specifications. This remove 1 error when parsing MSVC stl lib with clang. llvm-svn: 127961
* Semantic checking for exception specifications should be triggered byJohn McCall2011-03-021-1/+1
| | | | | | whether C++ exceptions are enabled, not exceptions in general. PR9358. llvm-svn: 126820
* We need a longer long when testing this pathe Microsoft ↵Douglas Gregor2011-02-221-1/+1
| | | | | | fixed-underlying-type extension for enumeration types llvm-svn: 126250
* Enable enumeration types with a fixed underlying type, e.g.,Douglas Gregor2011-02-221-0/+13
| | | | | | | | | enum X : long { Value = 0x100000000 }; when in Microsoft-extension mode (-fms-extensions). This (now C++0x) feature has been supported since Microsoft Visual Studio .NET 2003. llvm-svn: 126243
* Remove a c++ file test I inadvertently added in Sema last week. Francois Pichet2011-01-171-0/+12
| | | | llvm-svn: 123608
* Microsoft enum extensions. 2 things will change on -fms-extensions:Francois Pichet2010-10-181-1/+10
| | | | | | | 1. enum underlying type is int by default. 2. Error "enumerator value is not representable in the underlying type"is a ExtWarning llvm-svn: 116704
* Add basic support for Microsoft enum forward declaration. Francois Pichet2010-09-121-0/+4
| | | | | | Assigning an underlying integral type to an enum forward declaration will come in a next patch. llvm-svn: 113716
* Allow type definitions inside anonymous struct/union in Microsoft mode.Francois Pichet2010-09-081-1/+43
| | | | llvm-svn: 113354
* Transfer calling-convention attributes down to member function pointers.Douglas Gregor2010-09-011-0/+13
| | | | llvm-svn: 112715
* Emulate (some of) Microsoft's looser semantic checking of exceptionDouglas Gregor2010-08-301-1/+25
| | | | | | specifications, from Martin Vejnar! llvm-svn: 112482
* Predeclare class type_info in Microsoft mode, from Francois Pichet!Douglas Gregor2010-08-301-0/+7
llvm-svn: 112478
OpenPOWER on IntegriCloud