llvm-project/clang/lib/Serialization
Faisal Vali 81b756e6a3 [C++17] Fix PR34970 - tweak overload resolution for class template deduction-guides in line with WG21's p0620r0.
In order to identify the copy deduction candidate, I considered two approaches:
  - attempt to determine whether an implicit guide is a copy deduction candidate by checking certain properties of its subsituted parameter during overload-resolution.
  - using one of the many bits (WillHaveBody) from FunctionDecl (that CXXDeductionGuideDecl inherits from) that are otherwise irrelevant for deduction guides

After some brittle gymnastics w the first strategy, I settled on the second, although to avoid confusion and to give that bit a better name, i turned it into a member of an anonymous union.

Given this identification 'bit', the tweak to overload resolution was a simple reordering of the deduction guide checks (in SemaOverload.cpp::isBetterOverloadCandidate), in-line with Jason Merrill's p0620r0 drafting which made it into the working paper.  Concordant with that, I made sure the copy deduction candidate is always added.


References:
See https://bugs.llvm.org/show_bug.cgi?id=34970 
See http://wg21.link/p0620r0

llvm-svn: 316292
2017-10-22 14:45:08 +00:00
..
ASTCommon.cpp Revert r314955: "Remove PendingBody mechanism for function and ObjC method deserialization." 2017-10-11 07:47:54 +00:00
ASTCommon.h PR29097: add an update record when we instantiate the default member 2016-08-24 21:25:37 +00:00
ASTReader.cpp Fix warnings. [-Wdocumentation] 2017-10-12 09:42:14 +00:00
ASTReaderDecl.cpp [C++17] Fix PR34970 - tweak overload resolution for class template deduction-guides in line with WG21's p0620r0. 2017-10-22 14:45:08 +00:00
ASTReaderInternals.h Remove move constructors that are identical to the generated default move ctor. 2016-10-21 18:55:07 +00:00
ASTReaderStmt.cpp [OPENMP] Capture argument of `device` clause for target-based 2017-10-02 16:32:39 +00:00
ASTWriter.cpp Support for destroying operator delete, per C++2a proposal P0722. 2017-10-13 01:55:36 +00:00
ASTWriterDecl.cpp [C++17] Fix PR34970 - tweak overload resolution for class template deduction-guides in line with WG21's p0620r0. 2017-10-22 14:45:08 +00:00
ASTWriterStmt.cpp [OPENMP] Capture argument of `device` clause for target-based 2017-10-02 16:32:39 +00:00
CMakeLists.txt Introduce module file extensions to piggy-back data onto module files. 2015-11-03 18:33:07 +00:00
GeneratePCH.cpp Apply clang-tidy's performance-unnecessary-value-param to parts of clang. 2017-03-21 21:35:04 +00:00
GlobalModuleIndex.cpp [modules] Add ability to specify module name to module file mapping (reapply) 2017-08-31 06:26:43 +00:00
Module.cpp Modules: Simplify the ModuleFile constructor; likely NFC 2017-01-29 00:39:09 +00:00
ModuleFileExtension.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
ModuleManager.cpp [modules] Add ability to specify module name to module file mapping (reapply) 2017-08-31 06:26:43 +00:00
MultiOnDiskHashTable.h [NFC] Header cleanup 2016-07-18 19:02:11 +00:00