llvm-project/clang
Shafik Yaghmour aea82d4551 [Clang] Fix how we set the NumPositiveBits on an EnumDecl to cover the case of single enumerator with value zero or an empty enum
Currently in Sema::ActOnEnumBody(...) when calculating NumPositiveBits we miss
the case where there is only a single enumerator with value zero and the case of
an empty enum. In both cases we end up with zero positive bits when in fact we
need one bit to store the value zero.

This PR updates the calculation to account for these cases.

Differential Revision: https://reviews.llvm.org/D130301
2022-07-25 16:01:01 -07:00
..
bindings Strengthen -Wint-conversion to default to an error 2022-07-22 15:24:54 -04:00
cmake [cmake] Support custom package install paths 2022-07-25 21:02:53 +00:00
docs [Clang] Fix how we set the NumPositiveBits on an EnumDecl to cover the case of single enumerator with value zero or an empty enum 2022-07-25 16:01:01 -07:00
examples
include [clang][dataflow] Fix MapLattice::insert() to not drop return value 2022-07-25 14:24:33 -04:00
lib [Clang] Fix how we set the NumPositiveBits on an EnumDecl to cover the case of single enumerator with value zero or an empty enum 2022-07-25 16:01:01 -07:00
runtime Fix running orc-rt tests with LLVM_BUILD_EXTERNAL_COMPILER_RT (again). 2022-07-05 15:20:08 -07:00
test [Clang] Fix how we set the NumPositiveBits on an EnumDecl to cover the case of single enumerator with value zero or an empty enum 2022-07-25 16:01:01 -07:00
tools [clang] Remove redundant virtual specifies (NFC) 2022-07-24 22:02:58 -07:00
unittests [clang][dataflow] Fix MapLattice::insert() to not drop return value 2022-07-25 14:24:33 -04:00
utils Fix one stray `{LLVM -> CLANG}_TOOLS_INSTALL_DIR` 2022-07-23 16:26:32 +00:00
www [Clang] Status of the C++23 papers approved by WG21 at the July plenary 2022-07-25 19:43:06 +02:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [cmake] Don't export `LLVM_TOOLS_INSTALL_DIR` anymore 2022-07-21 19:04:00 +00: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 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/