llvm-project/clang-tools-extra/clang-tidy/cppcoreguidelines
Matheus Izvekov c9e46219f3
[clang] retain type sugar in auto / template argument deduction
This implements the following changes:
* AutoType retains sugared deduced-as-type.
* Template argument deduction machinery analyses the sugared type all the way
down. It would previously lose the sugar on first recursion.
* Undeduced AutoType will be properly canonicalized, including the constraint
template arguments.
* Remove the decltype node created from the decltype(auto) deduction.

As a result, we start seeing sugared types in a lot more test cases,
including some which showed very unfriendly `type-parameter-*-*` types.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Reviewed By: rsmith, #libc, ldionne

Differential Revision: https://reviews.llvm.org/D110216
2021-11-15 23:07:45 +01:00
..
AvoidGotoCheck.cpp [clang-tidy] Use new mapping matchers 2021-02-03 23:21:17 +00:00
AvoidGotoCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
AvoidNonConstGlobalVariablesCheck.cpp Remove false positive in AvoidNonConstGlobalVariables. 2020-04-15 14:48:06 -04:00
AvoidNonConstGlobalVariablesCheck.h Add CppCoreGuidelines I.2 "Avoid non-const global variables" check 2020-03-13 10:05:13 -04:00
CMakeLists.txt [clang-tidy] cppcoreguidelines-virtual-base-class-destructor: a new check 2021-09-09 13:23:38 +02:00
CppCoreGuidelinesTidyModule.cpp Remove 'IgnoreDestructors = true' from cppcoreguidelines-explicit-virtual-functions 2021-10-12 10:08:08 -04:00
InitVariablesCheck.cpp [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum 2021-07-30 18:24:47 +02:00
InitVariablesCheck.h [clang-tidy] Refactor IncludeInserter 2020-07-27 12:48:55 +01:00
InterfacesGlobalInitCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
InterfacesGlobalInitCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
MacroUsageCheck.cpp [test] Update tests 2021-03-09 22:32:28 -08:00
MacroUsageCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
NarrowingConversionsCheck.cpp [clang-tidy] NarrowingConversionsCheck should support inhibiting conversions of 2021-06-11 13:02:48 +02:00
NarrowingConversionsCheck.h [clang-tidy] NarrowingConversionsCheck should support inhibiting conversions of 2021-06-11 13:02:48 +02:00
NoMallocCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
NoMallocCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
OwningMemoryCheck.cpp [clang] retain type sugar in auto / template argument deduction 2021-11-15 23:07:45 +01:00
OwningMemoryCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
PreferMemberInitializerCheck.cpp [clang-tidy] Drop unnecessary const from return types (NFC) 2021-09-05 08:37:27 -07:00
PreferMemberInitializerCheck.h [clang-tidy] New check cppcoreguidelines-prefer-member-initializer 2020-09-21 14:42:58 +02:00
ProBoundsArrayToPointerDecayCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
ProBoundsArrayToPointerDecayCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
ProBoundsConstantArrayIndexCheck.cpp Reapply "Support Attr in DynTypedNode and ASTMatchers." 2021-08-06 22:30:32 +02:00
ProBoundsConstantArrayIndexCheck.h [clang-tidy] Refactor IncludeInserter 2020-07-27 12:48:55 +01:00
ProBoundsPointerArithmeticCheck.cpp [clang] retain type sugar in auto / template argument deduction 2021-11-15 23:07:45 +01:00
ProBoundsPointerArithmeticCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
ProTypeConstCastCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
ProTypeConstCastCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
ProTypeCstyleCastCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
ProTypeCstyleCastCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
ProTypeMemberInitCheck.cpp [clang-tidy] Fix lint warnings in clang-tidy source code (NFC) 2021-11-02 20:14:25 +13:00
ProTypeMemberInitCheck.h [clang-tidy] fix duplicate '{}' in cppcoreguidelines-pro-type-member-init 2021-08-14 10:48:04 +08:00
ProTypeReinterpretCastCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
ProTypeReinterpretCastCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
ProTypeStaticCastDowncastCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
ProTypeStaticCastDowncastCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
ProTypeUnionAccessCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
ProTypeUnionAccessCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
ProTypeVarargCheck.cpp [clang-tidy] Fix cppcoreguidelines-pro-type-vararg false positives with __builtin_ms_va_list 2021-05-04 13:49:20 +03:00
ProTypeVarargCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
SlicingCheck.cpp [clang-tidy] Fix lint warnings in clang-tidy source code (NFC) 2021-11-02 20:14:25 +13:00
SlicingCheck.h [clang-tidy] Fix lint warnings in clang-tidy source code (NFC) 2021-11-02 20:14:25 +13:00
SpecialMemberFunctionsCheck.cpp [clang-tidy] Simplify special member functions check 2021-02-27 12:13:24 +00:00
SpecialMemberFunctionsCheck.h [clang-tidy] Fix lint warnings in clang-tidy source code (NFC) 2021-11-02 20:14:25 +13:00
VirtualClassDestructorCheck.cpp [clang-tidy] Fix false positive in cppcoreguidelines-virtual-class-destructor 2021-10-16 08:27:08 +00:00
VirtualClassDestructorCheck.h [clang-tidy] cppcoreguidelines-virtual-base-class-destructor: a new check 2021-09-09 13:23:38 +02:00