summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/decl-microsoft-call-conv.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Renamed and changed the wording of warn_cconv_ignoredSunil Srivastava2019-07-171-1/+1
| | | | | | | | As discussed in D64780 the wording of this warning message is being changed to say 'is not supported' instead of 'ignored', and the diag ID itself is being changed to warn_cconv_not_supported. llvm-svn: 366368
* Revert "Append new attributes to the end of an AttributeList."Michael Kruse2018-06-251-1/+1
| | | | | | | This reverts commit r335084 as requested by David Jones and Eric Christopher because of differences of emitted warnings. llvm-svn: 335516
* Append new attributes to the end of an AttributeList.Michael Kruse2018-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... instead of prepending it at the beginning (the original behavior since implemented in r122535 2010-12-23). This builds up an AttributeList in the the order in which the attributes appear in the source. The reverse order caused nodes for attributes in the AST (e.g. LoopHint) to be in the reverse, and therefore printed in the wrong order by -ast-dump. Some TODO comments mention this. The order was explicitly reversed for enable_if attribute overload resolution and name mangling, which is not necessary anymore with this patch. The change unfortunately has some secondary effects, especially for diagnostic output. In the simplest cases, the CHECK lines or expected diagnostic were changed to the the new output. If the kind of error/warning changed, the attribute's order was changed instead. It also causes some 'previous occurrence here' hints to be textually after the main marker. This typically happens when attributes are merged, but are incompatible. Interchanging the role of the the main and note SourceLocation will also cause the case where two different declaration's attributes (in contrast to multiple attributes of the same declaration) are merged to be reversed. There is no easy fix because sometimes previous attributes are merged into a new declaration's attribute list, sometimes new attributes are added to a previous declaration's attribute list. Since 'previous occurrence here' pointing to locations after the main marker is not rare, I left the markers as-is; it is only relevant when the attributes are declared in the same declaration anyway, which often is on the same line. Differential Revision: https://reviews.llvm.org/D48100 llvm-svn: 335084
* PR24595: Ignore calling convention modifiers for structors in MS ABI.Andrey Bokhanko2015-09-141-1/+6
| | | | | | | | | | MS compiler ignores calling convention modifiers for structors. This patch makes clang do the same (for MS ABI). This fixes PR24595 and makes vswriter.h header (from Windows SDK 8.1) compilable. Differential Revision: http://reviews.llvm.org/D12402 llvm-svn: 247619
* Re-land "MS ABI: lambda call operators are instance methods and should use ↵Reid Kleckner2015-04-011-3/+19
| | | | | | | | | | | | | thiscall" Update the test cases to pass when lambda call operators use thiscall. Update the lambda-to-block conversion operator to use the default free function calling convention instead of the call operator's convention. This reverts commit r233082 and re-instates r233023. llvm-svn: 233835
* Reverting r233023 -- it caused test failures on Windows with MSVC x86.Aaron Ballman2015-03-241-19/+3
| | | | | | http://bb.pgr.jp/builders/ninja-clang-i686-msc18-R/builds/572 llvm-svn: 233082
* MS ABI: lambda call operators are instance methods and should use thiscallReid Kleckner2015-03-231-3/+19
| | | | | | Fixes an issue reported by Daniel Berenyi on cfe-dev. llvm-svn: 233023
* Add frontend support for __vectorcallReid Kleckner2014-10-241-1/+12
| | | | | | | | | | | | | Wire it through everywhere we have support for fastcall, essentially. This allows us to parse the MSVC "14" CTP headers, but we will miscompile them because LLVM doesn't support __vectorcall yet. Reviewed By: Aaron Ballman Differential Revision: http://reviews.llvm.org/D5808 llvm-svn: 220573
* MinGW: Define __stdcall&co when -fms-extensions is disabledReid Kleckner2014-04-211-0/+2
| | | | | | | | | | This is for compatibility with GCC. Reviewers: asl Differential Revision: http://reviews.llvm.org/D3444 llvm-svn: 206791
* Remove the -cxx-abi command-line flag.Hans Wennborg2014-01-141-1/+1
| | | | | | | | | | | | | | | This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples, Itanium otherwise. It's no longer possible to do weird combinations. To be able to run a test with a specific ABI without constraining it to a specific triple, new substitutions are added to lit: %itanium_abi_triple and %ms_abi_triple can be used to get the current target triple adjusted to the desired ABI. For example, if the test suite is running with the i686-pc-win32 target, %itanium_abi_triple will expand to i686-pc-mingw32. Differential Revision: http://llvm-reviews.chandlerc.com/D2545 llvm-svn: 199250
* Take into consideration calling convention when processing specializations.Rafael Espindola2013-12-101-0/+26
| | | | | | This fixes pr18141. llvm-svn: 196855
* Add an AdjustedType sugar node for adjusting calling conventionsReid Kleckner2013-12-051-0/+12
| | | | | | | | | | | | | | | | Summary: In general, this type node can be used to represent any type adjustment that occurs implicitly without losing type sugar. The immediate use of this is to adjust the calling conventions of member function pointer types without breaking template instantiation. Fixes PR17996. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2332 llvm-svn: 196451
* Handle CC and NoReturn when instantiating members of class templates.Rafael Espindola2013-12-011-0/+8
| | | | | | | | Before we were considering them only when instantiating templates. This fixes pr18033. llvm-svn: 196050
* Further fixes when thiscall is the default for methods.Rafael Espindola2013-11-191-0/+7
| | | | | | | | | | | | | | | | | | The previous patches tried to deduce the correct function type. I now realize this is not possible in general. Consider class foo { template <typename T> static void bar(T v); }; extern template void foo::bar(const void *); We will only know that bar is static after a lookup, so we have to handle this in the template instantiation code. This patch reverts my previous two changes (but not the tests) and instead handles the issue in DeduceTemplateArguments. llvm-svn: 195154
* The attached patch is a follow up from my previous one. The existingRafael Espindola2013-11-181-0/+9
| | | | | | | | | | logic was not handling typedefs as free functions. This was not causing problems with the existing tests, but does with the microsoft abi where they have to get a different calling convention. I will try to refactor this into a method on Declarator in a second. llvm-svn: 195050
* Use the default method CC in GetFullTypeForDeclarator.Rafael Espindola2013-11-181-0/+7
| | | | | | | | | | | | | Before this patch explicit template instatiations of member function templates were failing with the microsoft abi and 32 bits. This was happening because the expected and computed function types had different calling conventions. This patch fixes it by considering the default calling convention in GetFullTypeForDeclarator. This fixes pr17973. llvm-svn: 195032
* Ignore calling conventions when checking function template specializationsReid Kleckner2013-09-101-0/+16
| | | | | | | | | | | | | | | | | | | | Summary: Calling conventions are inherited during decl merging. Before this change, deduction would fail due to a type mismatch between the template and the specialization. This change adjusts the CCs to match before deduction, and lets the decl merging logic diagnose mismatch or inherit the CC from the template. This allows specializations of static member function templates in the Microsoft C++ ABI. Reviewers: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1570 llvm-svn: 190377
* Delete CC_Default and use the target default CC everywhereReid Kleckner2013-08-271-28/+62
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Makes functions with implicit calling convention compatible with function types with a matching explicit calling convention. This fixes things like calls to qsort(), which has an explicit __cdecl attribute on the comparator in Windows headers. Clang will now infer the calling convention from the declarator. There are two cases when the CC must be adjusted during redeclaration: 1. When defining a non-inline static method. 2. When redeclaring a function with an implicit or mismatched convention. Fixes PR13457, and allows clang to compile CommandLine.cpp for the Microsoft C++ ABI. Excellent test cases provided by Alexander Zinenko! Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1231 llvm-svn: 189412
* Fix declaring class template methods with an attributed typedefReid Kleckner2013-07-311-1/+27
| | | | | | | | | | | | | | This change unifies the logic for template instantiation of methods and functions declared with typedefs. It ensures that SubstFunctionType() always fills the Params out param with non-null ParmVarDecls or returns null. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1135 llvm-svn: 187528
* Fix MergeFunctionDecl implicit CC for static methods.Timur Iskhodzhanov2013-02-221-0/+86
Patch by Alexander Zinenko! llvm-svn: 175890
OpenPOWER on IntegriCloud