llvm-project/clang
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
..
INPUTS
bindings Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
cmake [CMake] Update Cmake cache file for Win to ARM Linux cross builds. NFC 2021-10-29 18:55:49 -07:00
docs [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
examples [clang-repl] Remove redundant link libraries and drop unused file. 2021-10-27 10:13:30 +00:00
include 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
lib [Clang] Fix instantiation of OpaqueValueExprs (Bug #45964) 2021-11-06 10:06:38 +02:00
runtime Prepare Compiler-RT for GnuInstallDirs, matching libcxx, document all 2021-07-13 15:21:41 +00:00
test [Clang] Fix instantiation of OpaqueValueExprs (Bug #45964) 2021-11-06 10:06:38 +02:00
tools [OpenMP] Add parsing/sema/serialization for 'bind' clause. 2021-11-04 14:40:30 -07:00
unittests [Coroutines] [Frontend] Lookup in std namespace first 2021-11-04 11:53:47 +08:00
utils [RISCV] Remove always_inline and nodebug attributes from RISCV vector intrinsic header. 2021-10-25 09:29:37 -07:00
www [NFC] Inclusive language: Remove instances of master in URLs 2021-11-05 08:48:41 -05:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [CMake] Fix typo in error message for LLD in bootstrap builds. 2021-10-06 22:38:12 +05:30
CODE_OWNERS.TXT Add myself as a code owner for SYCL support 2021-09-20 09:32:25 +03:00
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang development mailing list:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/