llvm-project/clang/test
Jason Rice b5aef90d46 [Clang] Fix instantiation of OpaqueValueExprs (Bug #45964)
The structured bindings decomposition of a non-dependent array in a dependent context (a template) were, upon instantiation, creating nested OpaqueValueExprs that would trigger assertions in CodeGen. Additionally the OpaqueValuesExpr's contained SourceExpr is being emitted in CodeGen, but there was no code for its transform in template instantiation. This would trigger other assertions such as when emitting a DeclRefExpr that refers to a VarDecl that is not marked as ODR-used.

This is all based on cursory deduction, but with the way the code flows from SemaTemplateInstantiate back to SemaInit, it is apparent that the nesting of OpaqueValueExpr is unintentional.

This commit fixes https://bugs.llvm.org/show_bug.cgi?id=45964 and possible other issues involving OpaqueValueExprs in template instantiations might be resolved.

Reviewed By: aaron.ballman, rjmccall

Differential Revision: https://reviews.llvm.org/D108482
2021-11-06 10:06:38 +02:00
..
APINotes
ARCMT [clang] [Objective C] Inclusive language: use objcmt-allowlist-dir-path=<arg> instead of objcmt-white-list-dir-path=<arg> 2021-11-05 12:27:05 -04:00
AST [Coroutines] [Frontend] Lookup in std namespace first 2021-11-04 11:53:47 +08:00
ASTMerge Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
Analysis [Coroutines] [Frontend] Lookup in std namespace first 2021-11-04 11:53:47 +08:00
CXX Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
ClangScanDeps [clang][deps] Keep #pragma push_macro, pop_macro and include_alias when minimizing source code. 2021-11-01 16:04:52 -04:00
CodeCompletion Diagnose -Wunused-value based on CFG reachability 2021-09-28 10:00:15 -07:00
CodeGen Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
CodeGenCUDA Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
CodeGenCXX [Clang] Fix instantiation of OpaqueValueExprs (Bug #45964) 2021-11-06 10:06:38 +02:00
CodeGenCoroutines Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
CodeGenHIP
CodeGenObjC Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
CodeGenObjCXX Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
CodeGenOpenCL Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
CodeGenOpenCLCXX Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
CodeGenSYCL Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
Coverage
CoverageMapping [Coroutines] [Frontend] Lookup in std namespace first 2021-11-04 11:53:47 +08:00
Driver [RISCV] Support Zfhmin extension 2021-11-06 01:41:02 +08:00
FixIt Implement P1949 2021-08-18 07:33:14 -04:00
Format
Frontend [clang] Add plugin ActionType to run command line plugin before main action 2021-10-20 08:58:20 -07:00
Headers Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
Import Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
Index [Coroutines] [Frontend] Lookup in std namespace first 2021-11-04 11:53:47 +08:00
Integration
InterfaceStubs
Interpreter Reland "[clang-repl] Allow loading of plugins in clang-repl." 2021-10-05 13:04:01 +00:00
Layout Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
Lexer [Coroutines] [Frontend] Lookup in std namespace first 2021-11-04 11:53:47 +08:00
LibClang
Misc [AArch64] Enablement of Cortex-X2 2021-11-01 11:55:24 +00:00
Modules Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
OpenMP Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
PCH Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
Parser [CUDA][NFC] Fix inexact warning message about lambdas 2021-10-27 01:28:35 +00:00
ParserSYCL
Preprocessor [Preprocessor] Fix newline before/after _Pragma. 2021-11-05 00:43:40 -05:00
Profile Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
Refactor
Rewriter
Sema Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
SemaCUDA [openmp] Emit deferred diag only when device compilation presents 2021-10-25 11:19:18 -07:00
SemaCXX Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
SemaObjC Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
SemaObjCXX Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
SemaOpenCL Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
SemaOpenCLCXX Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
SemaSYCL [X86][clang] Disable long double type for -mno-x87 option 2021-11-03 12:08:39 +03:00
SemaTemplate Revert "[clang] deprecate frelaxed-template-template-args, make it on by default" 2021-11-02 17:02:19 -04:00
TableGen
Templight
Tooling
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 Revert "[Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default" 2021-11-06 15:39:19 +09:00
.clang-format
CMakeLists.txt Reinstate "[clang-repl] Re-implement clang-interpreter as a test case." 2021-10-26 19:29:56 +00:00
TestRunner.sh
cxx-sections.data
lit.cfg.py Reinstate "[clang-repl] Re-implement clang-interpreter as a test case." 2021-10-26 19:29:56 +00:00
lit.site.cfg.py.in
make_test_dirs.pl