llvm-project/clang/lib/Sema
Yuanfang Chen 27a972a699 Diagnose -Wunused-value based on CFG reachability
(This relands 59337263ab and makes sure comma operator
 diagnostics are suppressed in a SFINAE context.)

While at it, add the diagnosis message "left operand of comma operator has no effect" (used by GCC) for comma operator.

This also makes Clang diagnose in the constant evaluation context which aligns with GCC/MSVC behavior. (https://godbolt.org/z/7zxb8Tx96)

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D103938
2021-09-28 10:00:15 -07:00
..
AnalysisBasedWarnings.cpp [clang] Expose unreachable fallthrough annotation warning 2021-08-16 17:14:55 -07:00
CMakeLists.txt [clang] Make libBasic not depend on MC 2021-04-28 12:16:22 -04:00
CodeCompleteConsumer.cpp [CodeComplete] Basic code completion for attribute names. 2021-08-12 23:49:10 +02:00
CoroutineStmtBuilder.h
DeclSpec.cpp [Clang] Add __ibm128 type to represent ppc_fp128 2021-09-06 18:00:58 +08: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] Support cl_ext_float_atomics 2021-09-13 12:12:40 +01:00
ParsedAttr.cpp [Clang] Add an explicit makeArrayRef to appease gcc 5.4. 2021-08-13 09:42:28 -07:00
Scope.cpp
ScopeInfo.cpp [clang] Enable support for #pragma STDC FENV_ACCESS 2020-10-25 06:46:25 -07:00
Sema.cpp [clang] don't mark as Elidable CXXConstruct expressions used in NRVO 2021-09-21 21:41:20 +02:00
SemaAccess.cpp [clang][NFC] Break out BaseUsingDecl from UsingDecl 2021-06-07 06:29:28 -07:00
SemaAttr.cpp Revert "[CLANG][PATCH][FPEnv] Add support for option -ffp-eval-method and extend #pragma float_control similarly" 2021-09-01 04:48:50 -07:00
SemaAvailability.cpp Cleanup identifier parsing; NFC 2021-09-14 09:12:22 -04:00
SemaCUDA.cpp [HIP] Warn capture this pointer in device lambda 2021-09-08 13:45:26 -04:00
SemaCXXScopeSpec.cpp [clang] Fix a few comment more typos to cycle bots 2021-09-20 19:42:49 -04:00
SemaCast.cpp [PowerPC] Emit error for Altivec vector initializations when -faltivec-src-compat=gcc is specified 2021-07-30 09:35:43 -05:00
SemaChecking.cpp [PowerPC] FP compare and test XL compat builtins. 2021-09-28 11:01:51 -05:00
SemaCodeComplete.cpp [clang] Fix a few comment more typos to cycle bots 2021-09-20 19:42:49 -04:00
SemaConcept.cpp [clang] Fix a few comment more typos to cycle bots 2021-09-20 19:42:49 -04:00
SemaConsumer.cpp
SemaCoroutine.cpp [clang] don't mark as Elidable CXXConstruct expressions used in NRVO 2021-09-21 21:41:20 +02:00
SemaDecl.cpp [Sema] Fix a null pointer reference crash. 2021-09-23 16:37:37 +02:00
SemaDeclAttr.cpp [clang] Fix a few comment more typos to cycle bots 2021-09-20 19:42:49 -04:00
SemaDeclCXX.cpp [clang] don't mark as Elidable CXXConstruct expressions used in NRVO 2021-09-21 21:41:20 +02:00
SemaDeclObjC.cpp [clang] Fix a few comment more typos to cycle bots 2021-09-20 19:42:49 -04:00
SemaExceptionSpec.cpp OpenMP 5.0 metadirective 2021-09-18 13:40:44 -05:00
SemaExpr.cpp Diagnose -Wunused-value based on CFG reachability 2021-09-28 10:00:15 -07:00
SemaExprCXX.cpp Diagnose -Wunused-value based on CFG reachability 2021-09-28 10:00:15 -07:00
SemaExprMember.cpp [OpenCL] Enables .rgba vector extension in C++ for OpenCL 2021 2021-09-14 13:05:42 +01:00
SemaExprObjC.cpp Cleanup identifier parsing; NFC 2021-09-14 09:12:22 -04:00
SemaFixItUtils.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
SemaInit.cpp [clang] Fix a few comment more typos to cycle bots 2021-09-20 19:42:49 -04:00
SemaLambda.cpp [clang] don't mark as Elidable CXXConstruct expressions used in NRVO 2021-09-21 21:41:20 +02:00
SemaLookup.cpp [clang] Fix a few comment more typos to cycle bots 2021-09-20 19:42:49 -04:00
SemaModule.cpp Change Module::ASTFile and ModuleFile::File => Optional<FileEntryRef>, NFC 2020-11-02 15:11:51 -05:00
SemaObjCProperty.cpp [clang] don't mark as Elidable CXXConstruct expressions used in NRVO 2021-09-21 21:41:20 +02:00
SemaOpenMP.cpp Revert "[OpenMP] Codegen aggregate for outlined function captures" 2021-09-21 13:20:39 -07:00
SemaOverload.cpp [CUDA] Pass ExecConfig through BuildCallToMemberFunction 2021-09-16 11:18:12 -07:00
SemaPseudoObject.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
SemaSYCL.cpp Change __builtin_sycl_unique_stable_name to just use an Itanium mangling 2021-09-28 06:41:03 -07:00
SemaStmt.cpp Diagnose -Wunused-value based on CFG reachability 2021-09-28 10:00:15 -07:00
SemaStmtAsm.cpp Fix assertion when passing function into inline asm's input operand 2021-08-27 13:39:41 -04:00
SemaStmtAttr.cpp Implemented [[clang::musttail]] attribute for guaranteed tail calls. 2021-04-15 17:12:21 -07:00
SemaTemplate.cpp [clang] Fix a few comment more typos to cycle bots 2021-09-20 19:42:49 -04:00
SemaTemplateDeduction.cpp [OpenCL] Defines helper function for OpenCL default address space 2021-09-21 15:12:08 +01:00
SemaTemplateInstantiate.cpp [clang] fix crash on template instantiation of invalid requires expressions 2021-08-03 23:16:04 +02:00
SemaTemplateInstantiateDecl.cpp Change __builtin_sycl_unique_stable_name to just use an Itanium mangling 2021-09-28 06:41:03 -07:00
SemaTemplateVariadic.cpp [Clang] Add __ibm128 type to represent ppc_fp128 2021-09-06 18:00:58 +08:00
SemaType.cpp [Clang] Ignore BTFTag attr if used as a type attribute 2021-09-22 13:48:29 -07:00
TreeTransform.h [clang][NFC] Fix needless double-parenthisation 2021-09-21 17:03:23 +02:00
TypeLocBuilder.cpp
TypeLocBuilder.h
UsedDeclVisitor.h DeferredDiagnosticsEmitter crashes 2020-10-08 11:42:21 -04:00