llvm-project/clang/test
Matheus Izvekov d98c34f4d7 [clang] fix error recovery ICE on copy elision when returing invalid variable
See PR51708.

Attempting copy elision in dependent contexts with invalid variable,
such as a variable with incomplete type, would cause a crash when attempting
to calculate it's alignment.

The fix is to just skip this optimization on invalid VarDecl, as otherwise this
provides no benefit to error recovery: This functionality does not try to
diagnose anything, it only calculates a flag which will affect where the
variable will be allocated during codegen.

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

Reviewed By: rtrieu

Differential Revision: https://reviews.llvm.org/D109191
2021-09-03 20:34:08 +02:00
..
APINotes
ARCMT
AST [Coroutines] [Clang] Look up coroutine component in std namespace first 2021-09-03 10:22:55 +08:00
ASTMerge
Analysis [Coroutines] [Clang] Look up coroutine component in std namespace first 2021-09-03 10:22:55 +08:00
CXX [clang] fix error recovery ICE on copy elision when returing invalid variable 2021-09-03 20:34:08 +02:00
ClangScanDeps [clang][deps] Reset non-modular language and preprocessor options 2021-08-26 08:43:21 +02:00
CodeCompletion [CodeCompletion] Provide placeholders for known attribute arguments 2021-08-19 14:03:41 +02:00
CodeGen Revert "[NFC] Recommit "Regenerate SVE ACLE intrinsics tests"" 2021-09-03 09:25:24 -04:00
CodeGenCUDA [CUDA] Fix static device variables with -fgpu-rdc 2021-08-25 09:31:22 +02:00
CodeGenCXX [Coroutines] [Clang] Look up coroutine component in std namespace first 2021-09-03 10:22:55 +08:00
CodeGenCoroutines [Coroutines] [Clang] Look up coroutine component in std namespace first 2021-09-03 10:22:55 +08:00
CodeGenHIP
CodeGenObjC Recommit "[Matrix] Overload stride arg in matrix.columnwise.load/store." 2021-08-12 18:31:57 +01:00
CodeGenObjCXX Reapply [IR] Don't mark mustprogress as type attribute 2021-07-09 20:57:44 +02:00
CodeGenOpenCL [OpenCL] Supports optional 64-bit floating point types in C++ for OpenCL 2021 2021-09-03 10:58:05 +01:00
CodeGenOpenCLCXX [C++4OpenCL] Introduces __remove_address_space utility 2021-08-06 10:40:22 +01:00
CodeGenSYCL Ensure field-annotations on pointers properly match the AS of the field. 2021-09-01 06:12:24 -07:00
Coverage Add a target triple to fix failures on MS build bots. 2021-06-30 17:27:26 -07:00
CoverageMapping [Coroutines] [Clang] Look up coroutine component in std namespace first 2021-09-03 10:22:55 +08:00
Driver [RISCV] Add SiFive core S51 2021-09-02 18:45:25 -07:00
FixIt Implement P1949 2021-08-18 07:33:14 -04:00
Format
Frontend [Clang] add support for error+warning fn attrs 2021-08-25 10:34:18 -07:00
Headers [OpenCL] Define OpenCL 3.0 optional core features in C++ for OpenCL 2021 2021-09-01 10:15:17 +01:00
Import
Index [Coroutines] [Clang] Look up coroutine component in std namespace first 2021-09-03 10:22:55 +08:00
Integration
InterfaceStubs [ifs][elfabi] Merge llvm-ifs/elfabi tools 2021-07-19 11:23:19 -07:00
Interpreter Reland "[clang-repl] Allow passing in code as positional arguments." 2021-07-10 17:54:00 +00:00
Layout [AIX] "aligned" attribute does not decrease alignment 2021-08-29 21:33:05 -04:00
Lexer Implement #pragma clang restrict_expansion 2021-08-23 09:46:38 -07:00
LibClang libclang.so: Make SONAME independent from LLVM version 2021-07-26 16:37:26 -07:00
Misc Revert "Reland "[clang-repl] Re-implement clang-interpreter as a test case."" 2021-09-03 13:18:09 +00:00
Modules [modules] Fix miscompilation when using two RecordDecl definitions with the same name. 2021-08-30 17:51:38 -07:00
OpenMP [OMPIRBuilder] Add ordered directive to OMPBuilder 2021-09-03 09:37:58 +08:00
PCH [Coroutines] [Clang] Look up coroutine component in std namespace first 2021-09-03 10:22:55 +08:00
Parser Implement P1949 2021-08-18 07:33:14 -04:00
ParserSYCL
Preprocessor [AIX][PowerPC] Define __powerpc and __PPC macros 2021-09-02 13:32:35 -04:00
Profile Update: clang/test/Profile/gcc-flag-compatibility.c to have -flto on AIX 2021-08-09 14:57:38 +00:00
Refactor
Rewriter
Sema [Clang][RISCV] Implement getConstraintRegister for RISC-V 2021-08-26 17:43:43 +01:00
SemaCUDA
SemaCXX [Coroutines] [Clang] Look up coroutine component in std namespace first 2021-09-03 10:22:55 +08:00
SemaObjC [Sema][ObjC] Allow conversions between pointers to ObjC pointers and 2021-08-25 10:22:29 -07:00
SemaObjCXX [clang] C++98 implicit moves are back with a vengeance 2021-07-13 19:16:49 +02:00
SemaOpenCL [OpenCL] Supports optional 64-bit floating point types in C++ for OpenCL 2021 2021-09-03 10:58:05 +01:00
SemaOpenCLCXX [C++][Sema] Ignore top-level qualifiers in casts 2021-07-05 12:22:08 +01:00
SemaSYCL
SemaTemplate Fully qualify template template parameters when printing 2021-09-02 15:04:34 -07:00
TableGen
Templight
Tooling [clang][tooling] Accept Clang invocations with multiple jobs 2021-07-27 10:47:55 +02:00
Unit
VFS [Modules] Do not remove failed modules after the control block phase 2021-08-17 16:46:51 -07:00
clang-rename
utils/update_cc_test_checks [llvm-lit] unbreak clang-only builds by not assuming llvm-lit in build dir 2021-08-31 18:57:47 +03:00
.clang-format
CMakeLists.txt Revert "Reland "[clang-repl] Re-implement clang-interpreter as a test case."" 2021-09-03 13:18:09 +00:00
TestRunner.sh
cxx-sections.data
lit.cfg.py Revert "Reland "[clang-repl] Re-implement clang-interpreter as a test case."" 2021-09-03 13:18:09 +00:00
lit.site.cfg.py.in libclang.so: Make SONAME independent from LLVM version 2021-07-26 16:37:26 -07:00
make_test_dirs.pl