summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/ms-exception-spec.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Ignore exception specifier mismatch when merging redeclarationsReid Kleckner2019-09-171-1/+28
| | | | | | | | | | | | | | | | | | Exception specifiers are now part of the function type in C++17. Normally, it is illegal to redeclare the same function or specialize a template with a different exception specifier, but under -fms-compatibility, we accept it with a warning. Without this change, the function types would not match due to the exception specifier, and clang would claim that the types were "incompatible". Now we emit the warning and merge the redeclaration as we would in C++14 and earlier. Fixes PR42842, which is about compiling _com_ptr_t in C++17. Based on a patch by Alex Fusco <alexfusco@google.com>! Differential Revision: https://reviews.llvm.org/D67590 llvm-svn: 372178
* Move EH spec mismatches under -fms-compatibilityReid Kleckner2019-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | -fms-extensions is intended to enable conforming language extensions and -fms-compatibility is intended to language rule relaxations, so a user could plausibly compile with -fno-ms-compatibility on Windows while still using dllexport, for example. This exception specification validation behavior has been handled as a warning since before -fms-compatibility was added in 2011. I think it's just an oversight that it hasn't been moved yet. This will help users find conformance issues in their code such as those found in _com_ptr_t as described in https://llvm.org/PR42842. Reviewers: hans Subscribers: STL_MSFT, cfe-commits Differential Revision: https://reviews.llvm.org/D66770 llvm-svn: 370087
* [Sema] Return an appropriate result from CheckSpecifiedExceptionTypeDavid Majnemer2016-06-111-3/+4
| | | | | | | | We shouldn't return true from CheckSpecifiedExceptionType if the record type is incomplete and -fms-extensions is engaged. Otherwise we will have an incomplete AST. llvm-svn: 272447
* [-fms-extensions] Permit incomplete types in dynamic exception specificationsDavid Majnemer2016-06-101-1/+5
| | | | | | | | | | Microsoft headers, comdef.h and comutil.h, assume that this is an OK thing to do. Downgrade the hard error to a warning if we are in -fms-extensions mode. This fixes PR28080. llvm-svn: 272412
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-191-0/+1
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Parse the exception-specification throw(...), a Microsoft extensionDouglas Gregor2008-12-011-0/+3
llvm-svn: 60359
OpenPOWER on IntegriCloud