llvm-project/clang
Corentin Jabot 683e83c56f [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr
Allow goto, labelled statements as well as `static`, `thread_local`, and
non-literal variables in `constexpr` functions.

As specified. for all of the above (except labelled statements) constant
evaluation of the construct still fails.

For `constexpr` bodies, the proposal is implemented with diagnostics as
a language extension in older language modes. For determination of
whether a lambda body satisfies the requirements for a constexpr
function, the proposal is implemented only in C++2b mode to retain the
semantics of older modes for programs conforming to them.

Reviewed By: aaron.ballman, hubert.reinterpretcast, erichkeane

Differential Revision: https://reviews.llvm.org/D111400
2022-03-22 19:51:19 +01:00
..
bindings Recommit: Compress formatting of array type names (int [4] -> int[4]) 2021-10-21 11:34:43 -07:00
cmake [CMake][Fuchsia] Switch to lld on Apple platforms 2022-03-22 01:06:30 -07:00
docs [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr 2022-03-22 19:51:19 +01:00
examples clang-analyzer plugins require LLVM_ENABLE_PLUGINS also 2022-02-16 11:59:09 -05:00
include [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr 2022-03-22 19:51:19 +01:00
lib [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr 2022-03-22 19:51:19 +01:00
runtime Fix running orc-rt tests with LLVM_BUILD_EXTERNAL_COMPILER_RT 2022-01-25 08:27:40 -08:00
test [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr 2022-03-22 19:51:19 +01:00
tools [LTO] Add configuartion option to use default optimization pipeline 2022-03-22 09:28:45 -04:00
unittests [clang-format] don't break up #-style comment sections 2022-03-22 15:29:02 +01:00
utils [RISCV][NFC] Refine and refactor RISCVVEmitter and riscv_vector.td. 2022-03-22 09:58:43 -07:00
www [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr 2022-03-22 19:51:19 +01:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [CMake][Clang] Skip host link version detection for lld on Darwin 2022-03-21 18:32:03 -07:00
CODE_OWNERS.TXT
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/