llvm-project/clang
Eli Friedman 5955a0f937 Allow flexible array initialization in C++.
Flexible array initialization is a C/C++ extension implemented in many
compilers to allow initializing the flexible array tail of a struct type
that contains a flexible array. In clang, this is currently restricted
to C. But this construct is used in the Microsoft SDK headers, so I'd
like to extend it to C++.

For now, this doesn't handle dynamic initialization; probably not hard
to implement, but it's extra code, and I don't think it's necessary for
the expected uses.  And we explicitly fail out of constant evaluation.

I've added some additional code to assert that initializers have the
correct size, with or without flexible array init. This might catch
issues unrelated to flexible array init.

Differential Revision: https://reviews.llvm.org/D123649
2022-04-14 11:56:40 -07:00
..
bindings
cmake [NFC] Add CMake cache file for HLSL 2022-04-13 11:28:18 -05:00
docs Revert "[clang] Implement Change scope of lambda trailing-return-type" 2022-04-13 21:34:08 -07:00
examples clang-analyzer plugins require LLVM_ENABLE_PLUGINS also 2022-02-16 11:59:09 -05:00
include Allow flexible array initialization in C++. 2022-04-14 11:56:40 -07:00
lib Allow flexible array initialization in C++. 2022-04-14 11:56:40 -07:00
runtime Fix running orc-rt tests with LLVM_BUILD_EXTERNAL_COMPILER_RT 2022-01-25 08:27:40 -08:00
test Allow flexible array initialization in C++. 2022-04-14 11:56:40 -07:00
tools Reland "[AST] Add a new TemplateKind for template decls found via a using decl."" 2022-04-14 11:04:55 +02:00
unittests [clang-format] Skip preprocessor lines when finding the record lbrace 2022-04-14 09:31:15 -07:00
utils [HLSL] Add Semantic syntax, and SV_GroupIndex 2022-04-14 10:21:58 -05:00
www Revert "[clang] Implement Change scope of lambda trailing-return-type" 2022-04-13 21:34:08 -07:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [Clang] Enable opaque pointers by default 2022-04-11 11:13:45 +02:00
CODE_OWNERS.TXT
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt Replace links to archived mailing lists by links to Discourse forums 2022-03-23 10:10:20 -04:00

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 forums:
  https://discourse.llvm.org/c/clang/

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