SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [libc] Add memset and bzero implementations (details)
  2. [clang-format][PR45816] Add AlignConsecutiveBitFields (details)
  3. [clang-format] [PR33890] Add support for Microsoft C++/CLI non standard for each looping extension (details)
  4. [clang-format] [PR42164] Add Option to Break before While (details)
  5. Revert "[IR] Simplify BasicBlock::removePredecessor. NFCI." (details)
  6. [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'. (details)
Commit 6ca54e01146d91ca3ae3d72bf1cd988fca704630 by gchatelet
[libc] Add memset and bzero implementations

Summary: This patch adds general purpose `memset` and `bzero` implementations.

Reviewers: sivachandra, abrachet

Subscribers: mgorny, tschuett, ecnelises, libc-commits, courbet

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D80010
The file was modifiedlibc/src/string/memory_utils/CMakeLists.txt
The file was modifiedlibc/test/src/string/memcpy_test.cpp
The file was addedlibc/src/string/memset.h
The file was addedlibc/src/string/memset.cpp
The file was addedlibc/src/string/bzero.h
The file was addedlibc/src/string/bzero.cpp
The file was modifiedlibc/src/string/memory_utils/memcpy_utils.h
The file was addedlibc/test/src/string/bzero_test.cpp
The file was modifiedlibc/lib/CMakeLists.txt
The file was addedlibc/test/src/string/memset_test.cpp
The file was modifiedlibc/src/string/x86/CMakeLists.txt
The file was addedlibc/src/string/memory_utils/memset_utils.h
The file was modifiedlibc/test/src/string/CMakeLists.txt
The file was modifiedlibc/src/string/CMakeLists.txt
Commit b99bf0e08be4faa4527709541dfdc29240e0c75c by mydeveloperday
[clang-format][PR45816] Add AlignConsecutiveBitFields

Summary:
The following revision follows D80115 since @MyDeveloperDay and I apparently both had the same idea at the same time, for https://bugs.llvm.org/show_bug.cgi?id=45816 and my efforts on tooling support for AMDVLK, respectively.

This option aligns adjacent bitfield separators across lines, in a manner similar to AlignConsecutiveAssignments and friends.

Example:
```
struct RawFloat {
  uint32_t sign : 1;
  uint32_t exponent : 8;
  uint32_t mantissa : 23;
};
```
would become
```
struct RawFloat {
  uint32_t sign     : 1;
  uint32_t exponent : 8;
  uint32_t mantissa : 23;
};
```

This also handles c++2a style bitfield-initializers with AlignConsecutiveAssignments.
```
struct RawFloat {
  uint32_t sign     : 1  = 0;
  uint32_t exponent : 8  = 127;
  uint32_t mantissa : 23 = 0;
}; // defaults to 1.0f
```

Things this change does not do:
- Align multiple comma-chained bitfield variables. None of the other
   AlignConsecutive* options seem to implement that either.
- Detect bitfields that have a width specified with something other
   than a numeric literal (ie, `int a : SOME_MACRO;`). That'd be fairly
   difficult to parse and is rare.

Patch By:  JakeMerdichAMD

Reviewed By: MyDeveloperDay

Subscribers: cfe-commits, MyDeveloperDay

Tags: #clang, #clang-format

Differential Revision: https://reviews.llvm.org/D80176
The file was modifiedclang/lib/Format/WhitespaceManager.cpp
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/lib/Format/Format.cpp
The file was modifiedclang/lib/Format/WhitespaceManager.h
The file was modifiedclang/docs/ClangFormatStyleOptions.rst
The file was modifiedclang/docs/ReleaseNotes.rst
The file was modifiedclang/include/clang/Format/Format.h
Commit cc918e90c048c6c9a59ed08e7b2a2f92b4ac8140 by mydeveloperday
[clang-format] [PR33890] Add support for Microsoft C++/CLI non standard for each looping extension

Summary:
https://bugs.llvm.org/show_bug.cgi?id=33890

This revision allow the microsoft `for each(.... in ...` nonstandard C++ extension which can be used in C++/CLI to be handled as a ForEach macro.

This prevents the breaking between the for and each onto a new line

Reviewed By: JakeMerdichAMD

Subscribers: cfe-commits

Tags: #clang, #clang-format

Differential Revision: https://reviews.llvm.org/D80228
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/lib/Format/FormatTokenLexer.cpp
The file was modifiedclang/lib/Format/FormatTokenLexer.h
Commit 807ab2cd0db398c420ca5b8a7fc260aaea5051a1 by mydeveloperday
[clang-format] [PR42164] Add Option to Break before While

Summary:
Its currently not possible to recreate the GNU style using the `BreakBeforeBraces: Custom` style due to a lack of missing `BeforeWhile` in the `BraceWrappingFlags`

The following request was raised to add `BeforeWhile` in a `do..while` context like `BeforeElse` and `BeforeCatch` to give greater control over the positioning of the `while`

https://bugs.llvm.org/show_bug.cgi?id=42164

Reviewers: krasimir, mitchell-stellar, sammccall

Reviewed By: krasimir

Subscribers: cfe-commits

Tags: #clang, #clang-format

Differential Revision: https://reviews.llvm.org/D79325
The file was modifiedclang/docs/ClangFormatStyleOptions.rst
The file was modifiedclang/lib/Format/UnwrappedLineParser.cpp
The file was modifiedclang/docs/ReleaseNotes.rst
The file was modifiedclang/lib/Format/Format.cpp
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/include/clang/Format/Format.h
Commit b42b30c335bccccca95470aa47dade2e25cb8994 by jay.foad
Revert "[IR] Simplify BasicBlock::removePredecessor. NFCI."

This reverts commit 59f49f7ee7f3397e000f7e11facb4a5605cd1cab.

It was causing buildbot failures.
The file was modifiedllvm/include/llvm/IR/BasicBlock.h
The file was modifiedllvm/lib/IR/BasicBlock.cpp
Commit f7c9f77ef3721c956499b0ccf5e585de105aae4e by 1.int32
[Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

Summary:
Stream functions `fread` and `fwrite` are evaluated
and preconditions checked.
A new bug type is added for a (non fatal) warning if `fread`
is called in EOF state.

Reviewers: Szelethus, NoQ, dcoughlin, baloghadamsoftware, martong, xazax.hun

Reviewed By: Szelethus

Subscribers: rnkovacs, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, gamesh411, Charusso, martong, ASDenysPetrov, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80015
The file was modifiedclang/test/Analysis/stream-error.c
The file was modifiedclang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp