summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [ms] Give -Wmicrosoft-enum-forward-reference a chance to fire in clang-cl, ↵Nico Weber2017-04-211-23/+0
| | | | | | | | | | | | | | | | | | PR32736 clang-cl sets MicrosoftCompat. In that mode, we always give enums a fixed underlying type, and for enums with fixed underlying type we never enter the block that tries to emit ext_ms_forward_ref_enum. Fix this by requiring an explicit underlying type when we're skipping this diagnostic. We had a test for this warning, but it only ran in C++98 mode. clang-cl always enables -std=c++14, so MicrosoftCompatibiliy-cxx98.cpp is a fairly useless test. Fold it into MicrosoftCompatibility.cpp -- that way, the test checks if -Wmicrosoft-enum-forward-reference can fire in clang-cl builds. https://reviews.llvm.org/D32369 llvm-svn: 301032
* [MSVC Compat] Make -Wmicrosoft-cast not an error by defaultDavid Majnemer2015-11-181-1/+1
| | | | | | Too much code is sloppy about this to error by default. llvm-svn: 253506
* [MSVC Compat] Permit conversions from pointer-to-function to ↵David Majnemer2015-10-311-0/+9
| | | | | | | | | | | pointer-to-object iff -fms-compatibility We permit implicit conversion from pointer-to-function to pointer-to-object when -fms-extensions is specified. This is rather unfortunate, move this into -fms-compatibility and only permit it within system headers unless -Wno-error=microsoft-cast is specified. llvm-svn: 251738
* [MSVC Compatibility] Classify ext_ms_cast_fn_obj as DefaultErrorDavid Majnemer2015-08-111-1/+1
| | | | | | | | This non-conforming extension was introduced to make it possible for us to correctly compile <atomic> in VS 2013 and 2015. Let's limit its impact to system headers to encourage portable code. llvm-svn: 244650
* [MSVC Compatibility] Don't diagnose c-style cast from void-ptr to fn-ptrDavid Majnemer2015-06-091-1/+5
| | | | | | | | The machinery added to permit a static_cast from void-ptr to fn-ptr unintentionally gets triggered for c-style casts and function-style casts. The observable effect was a diagnostic issued inappropriately. llvm-svn: 239382
* [MSVC Compatibility] Permit static_cast from void-ptr to function-ptrDavid Majnemer2015-06-021-0/+2
| | | | | | | | | | | The MSVC 2013 and 2015 implementation of std::atomic is specialized for pointer types. The member functions are implemented using a static_cast from void-ptr to function-ptr which is not allowed in the standard. Permit this conversion if -fms-compatibility is present. This fixes PR23733. llvm-svn: 238877
* Shift Microsoft enum extensions from -fms-extensions to -fms-compatibility, ↵Eli Friedman2012-02-161-0/+8
so -fms-extensions doesn't affect enum semantics in incompatible ways. <rdar://problem/10657186>. llvm-svn: 150663
OpenPOWER on IntegriCloud