llvm-project/clang/lib/Sema
Yuanfang Chen 63e0d038fc Diagnose -Wunused-value based on CFG reachability
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-20 10:43:34 -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] Fix long double availability check 2021-09-17 15:24:06 +08: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] p1099 using enum part 2 2021-06-08 11:11:46 -07: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 [X86] AVX512FP16 instructions enabling 6/6 2021-08-30 13:08:45 +08:00
SemaCodeComplete.cpp [CodeCompletion] Provide placeholders for known attribute arguments 2021-08-19 14:03:41 +02:00
SemaConcept.cpp Adding an assertion back. 2021-08-26 12:51:14 -04:00
SemaConsumer.cpp
SemaCoroutine.cpp Revert "[Coroutines] [Clang] Look up coroutine component in std namespace first" 2021-09-03 16:01:09 -04:00
SemaDecl.cpp Revert "[clang] Check unsupported types in expressions" 2021-09-13 15:34:21 +03:00
SemaDeclAttr.cpp [OpenCL] Supports optional same image reads and writes in C++ for OpenCL 2021 2021-09-17 14:14:31 +01:00
SemaDeclCXX.cpp PR51874: Fix diagnostics for defaulted, implicitly deleted 'operator!='. 2021-09-15 15:43:02 -07:00
SemaDeclObjC.cpp [clang][NFC] refactor GlobalMethodPool to encapsulate its map 2021-09-16 14:02:14 -07: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-20 10:43:34 -07:00
SemaExprCXX.cpp Diagnose -Wunused-value based on CFG reachability 2021-09-20 10:43:34 -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 PR51105: look through ConstantExpr when looking for a braced string literal initialization. 2021-08-25 11:36:11 -07:00
SemaLambda.cpp [clang][patch][FPEnv] Make initialization of C++ globals strictfp aware 2021-07-29 12:02:37 -04:00
SemaLookup.cpp [clang][patch][FPEnv] Make initialization of C++ globals strictfp aware 2021-07-29 12:02:37 -04: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 5.0 metadirective 2021-09-18 13:40:44 -05: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 Revert "[SYCL][NFC] Ensure SYCL kernel for unique-stable-name is unqualified." 2021-06-21 13:23:52 -07:00
SemaStmt.cpp Diagnose -Wunused-value based on CFG reachability 2021-09-20 10:43:34 -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] Enable the special enable_if_t diagnostics for libc++'s __enable_if_t as well. 2021-09-11 13:44:51 -05:00
SemaTemplateDeduction.cpp PR45881: Properly use CXXThisOverride for templated lambda 2021-09-07 17:02:24 -07:00
SemaTemplateInstantiate.cpp [clang] fix crash on template instantiation of invalid requires expressions 2021-08-03 23:16:04 +02:00
SemaTemplateInstantiateDecl.cpp [clang] fix error recovery ICE on copy elision when returing invalid variable 2021-09-03 20:34:08 +02:00
SemaTemplateVariadic.cpp [Clang] Add __ibm128 type to represent ppc_fp128 2021-09-06 18:00:58 +08:00
SemaType.cpp [clang][NFC] Remove dead code 2021-09-20 11:33:34 +02:00
TreeTransform.h OpenMP 5.0 metadirective 2021-09-18 13:40:44 -05:00
TypeLocBuilder.cpp
TypeLocBuilder.h
UsedDeclVisitor.h DeferredDiagnosticsEmitter crashes 2020-10-08 11:42:21 -04:00