llvm-project/clang/lib/Sema
Alexandru Octavian Butiu 78d404a11d [clang][c++20] Fix false warning for unused private fields when a class has only defaulted comparison operators.
Fixes bug 50263

When "unused-private-field" flag is on if you have a struct with private
members and only defaulted comparison operators clang will warn about
unused private fields.

If you where to write the comparison operators by hand no warning is
produced.

This is a bug since defaulting a comparison operator uses all private
members .

The fix is simple, in CheckExplicitlyDefaultedFunction just clear the
list of unused private fields if the defaulted function is a comparison
function.

Differential revision: https://reviews.llvm.org/D102186
2021-06-22 18:40:16 +02:00
..
AnalysisBasedWarnings.cpp [-Wcalled-once] Do not run analysis on Obj-C++ 2021-04-22 15:20:52 +03:00
CMakeLists.txt [clang] Make libBasic not depend on MC 2021-04-28 12:16:22 -04:00
CodeCompleteConsumer.cpp [Sema] Use isa<> instead of dyn_cast<> as pointer is never dereferenced. NFCI. 2020-11-15 12:58:36 +00:00
CoroutineStmtBuilder.h
DeclSpec.cpp Re-commit [clang] Add support for the "abstract" contextual keyword of MSVC 2021-05-31 18:45:26 +02:00
DelayedDiagnostic.cpp
IdentifierResolver.cpp
JumpDiagnostics.cpp [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1 2021-05-17 22:42:17 -07:00
MultiplexExternalSemaSource.cpp [clang][AST] Improve AST Reader/Writer memory footprint 2021-05-20 15:34:29 -07:00
OpenCLBuiltins.td [OpenCL] Add const attribute to ctz() builtins 2021-06-07 11:41:52 +01:00
ParsedAttr.cpp Correct the tablegen for checking mutually exclusive stmt attrs 2021-04-13 15:20:30 -04:00
Scope.cpp
ScopeInfo.cpp [clang] Enable support for #pragma STDC FENV_ACCESS 2020-10-25 06:46:25 -07:00
Sema.cpp [clang] Implement P2266 Simpler implicit move 2021-06-18 17:08:59 +02:00
SemaAccess.cpp [clang][NFC] Break out BaseUsingDecl from UsingDecl 2021-06-07 06:29:28 -07:00
SemaAttr.cpp [clang] Make libBasic not depend on MC 2021-04-28 12:16:22 -04:00
SemaAvailability.cpp [clang] RecursiveASTVisitor visits ObjCPropertyRefExpr's class receiver 2021-06-01 14:45:25 -04:00
SemaCUDA.cpp [CUDA][HIP] Promote const variables to constant 2021-06-01 21:28:41 -04:00
SemaCXXScopeSpec.cpp [clang] p1099 using enum part 2 2021-06-08 11:11:46 -07:00
SemaCast.cpp [ADT] Remove APInt/APSInt toString() std::string variants 2021-06-11 13:19:15 +01:00
SemaChecking.cpp [Sema] Fix for PR50741 2021-06-17 16:16:59 +02:00
SemaCodeComplete.cpp [clang] p1099 using enum part 2 2021-06-08 11:11:46 -07:00
SemaConcept.cpp [ADT] Remove APInt/APSInt toString() std::string variants 2021-06-11 13:19:15 +01:00
SemaConsumer.cpp
SemaCoroutine.cpp [clang] Implement P2266 Simpler implicit move 2021-06-18 17:08:59 +02:00
SemaDecl.cpp [ADT] Remove APInt/APSInt toString() std::string variants 2021-06-11 13:19:15 +01:00
SemaDeclAttr.cpp [Sema][SVE] Properly match builtin ID when using aux target 2021-06-21 12:52:18 +01:00
SemaDeclCXX.cpp [clang][c++20] Fix false warning for unused private fields when a class has only defaulted comparison operators. 2021-06-22 18:40:16 +02:00
SemaDeclObjC.cpp [ObjC] Add a command line flag that disables recognition of objc_direct for testability 2021-04-06 11:17:01 -04:00
SemaExceptionSpec.cpp [OpenMP] Implement '#pragma omp unroll'. 2021-06-10 14:30:17 -05:00
SemaExpr.cpp [ADT] Remove APInt/APSInt toString() std::string variants 2021-06-11 13:19:15 +01:00
SemaExprCXX.cpp [clang] Implement P2266 Simpler implicit move 2021-06-18 17:08:59 +02:00
SemaExprMember.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
SemaExprObjC.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
SemaFixItUtils.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
SemaInit.cpp [ADT] Remove APInt/APSInt toString() std::string variants 2021-06-11 13:19:15 +01:00
SemaLambda.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
SemaLookup.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
SemaModule.cpp Change Module::ASTFile and ModuleFile::File => Optional<FileEntryRef>, NFC 2020-11-02 15:11:51 -05:00
SemaObjCProperty.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
SemaOpenMP.cpp [OPENMP]Fix PR50699: capture locals in combine directrives for aligned clause. 2021-06-15 04:58:02 -07:00
SemaOverload.cpp [OpenCL] Fix overloading resolution of addrspace constructors 2021-06-11 11:12:33 +01:00
SemaPseudoObject.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
SemaSYCL.cpp Revert "[SYCL][NFC] Ensure SYCL kernel for unique-stable-name is unqualified." 2021-06-21 13:23:52 -07:00
SemaStmt.cpp [clang] Implement P2266 Simpler implicit move 2021-06-18 17:08:59 +02:00
SemaStmtAsm.cpp [ADT] Remove APInt/APSInt toString() std::string variants 2021-06-11 13:19:15 +01:00
SemaStmtAttr.cpp Implemented [[clang::musttail]] attribute for guaranteed tail calls. 2021-04-15 17:12:21 -07:00
SemaTemplate.cpp [ADT] Remove APInt/APSInt toString() std::string variants 2021-06-11 13:19:15 +01:00
SemaTemplateDeduction.cpp Add type information to integral template argument if required. 2021-05-12 19:00:08 +00:00
SemaTemplateInstantiate.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
SemaTemplateInstantiateDecl.cpp [clang] NRVO: Improvements and handling of more cases. 2021-06-17 01:56:38 +02:00
SemaTemplateVariadic.cpp Revert "Following up on PR48517, fix handling of template arguments that refer" 2021-01-20 15:55:35 +01:00
SemaType.cpp [OpenCL] Add support of __opencl_c_images feature macro 2021-06-21 18:24:07 +03:00
TreeTransform.h [clang] NFC: adjust indentation of statements with more than one lines 2021-06-21 10:17:10 +08:00
TypeLocBuilder.cpp [NFC] avoid AlignedCharArray in clang 2019-07-29 23:12:48 +00:00
TypeLocBuilder.h [NFC] avoid AlignedCharArray in clang 2019-07-29 23:12:48 +00:00
UsedDeclVisitor.h DeferredDiagnosticsEmitter crashes 2020-10-08 11:42:21 -04:00