llvm-project/clang
Aaron Ballman ab2ca8496d consteval if does not form a discarded statement
When we added support for if consteval, we accidentally formed a discarded
statement evaluation context for the branch-not-taken. However, a discarded
statement is a property of an if constexpr statement, not an if consteval
statement (https://eel.is/c++draft/stmt.if#2.sentence-2). This turned out to
cause issues when deducing the return type from a function with a consteval if
statement -- we wouldn't consider the branch-not-taken when deducing the return
type.

This fixes PR52206.

Note, there is additional work left to be done. We need to track discarded
statement and immediate evaluation contexts separately rather than as being
mutually exclusive.
2021-10-20 07:24:55 -04:00
..
INPUTS
bindings [Clang] Add __ibm128 type to represent ppc_fp128 2021-09-06 18:00:58 +08:00
cmake [CMake] Include llvm-libtool-darwin in Fuchsia toolchain 2021-10-07 16:44:40 -07:00
docs [docs] Fix hyperlink 2021-10-20 10:20:17 +01:00
examples Revert "Reland "[clang-repl] Re-implement clang-interpreter as a test case."" 2021-10-08 17:43:23 -07:00
include [clang] Add option to disable -clear-ast-before-backend 2021-10-19 20:51:48 -07:00
lib consteval if does not form a discarded statement 2021-10-20 07:24:55 -04:00
runtime Prepare Compiler-RT for GnuInstallDirs, matching libcxx, document all 2021-07-13 15:21:41 +00:00
test consteval if does not form a discarded statement 2021-10-20 07:24:55 -04:00
tools [clang-format] git-clang-format throws an assertion when removing files as part of the commit 2021-10-20 09:07:12 +01:00
unittests [clang-format] [PR52015] clang-format should put __attribute__((foo)) on its own line before @interface / @implementation / @protocol 2021-10-20 09:09:31 +01:00
utils [RISCV] Use llvm::stable_sort instead of std::stable_sort. NFC 2021-10-19 11:37:40 -07:00
www [doc][clang] correct version for p0388 implementation 2021-10-13 04:12:07 -07:00
.clang-format
.clang-tidy .clang-tidy: Disable misc-no-recursion in general/across the monorepo 2021-06-08 08:31:33 -07:00
.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/