SuccessChanges

Summary

  1. [Sema] List conversion validate character array. (details)
  2. [NFCI][clang-tidy] FunctionCognitiveComplexityCheck::check(): try to fix windows arm build bots (details)
  3. [InstCombine] recognizeBSwapOrBitReverseIdiom - support for 'partial' bswap patterns (PR47191) (Reapplied) (details)
  4. modernize-use-trailing-return-type fix for PR44206 (details)
  5. [flang][NFC] Fix build errors for clang-10 (details)
  6. [InstCombine] recognizeBSwapOrBitReverseIdiom - use generic CreateIntegerCast (details)
Commit 0ce6d6b46eb7040283ad0800c5533672fbfb9bac by koraq
[Sema] List conversion validate character array.

The function `TryListConversion` didn't properly validate the following
part of the standard:

    Otherwise, if the parameter type is a character array [... ]
    and the initializer list has a single element that is an
    appropriately-typed string literal (8.5.2 [dcl.init.string]), the
    implicit conversion sequence is the identity conversion.

This caused the following call to `f()` to be ambiguous.
    void f(int(&&)[1]);
    void f(unsigned(&&)[1]);

    void g(unsigned i) {
      f({i});
    }

This issue only occurs when the initializer list had one element.

Differential Revision: https://reviews.llvm.org/D87561
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/test/CXX/drs/dr14xx.cpp
The file was modifiedclang/lib/Sema/SemaOverload.cpp
The file was modifiedclang/lib/Sema/SemaInit.cpp
The file was modifiedclang/test/SemaObjCXX/overload.mm
Commit 1596cc83509342eb37dbfe6b95e906759afc6741 by lebedev.ri
[NFCI][clang-tidy] FunctionCognitiveComplexityCheck::check(): try to fix windows arm build bots

http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l/builds/1482/steps/build-llvm-project/logs/stdio
http://lab.llvm.org:8011/builders/llvm-clang-win-x-aarch64/builds/3285/steps/build-llvm-project/logs/stdio
The file was modifiedclang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp
Commit 3aa93f690b097257e9a2e48b133c4f413bc3ed92 by llvm-dev
[InstCombine] recognizeBSwapOrBitReverseIdiom - support for 'partial' bswap patterns (PR47191) (Reapplied)

If we're bswap'ing some bytes and zero'ing the remainder we can perform this as a bswap+mask which helps us match 'partial' bswaps as a first step towards folding into a more complex bswap pattern.

Reapplied with early-out if recognizeBSwapOrBitReverseIdiom collects a source wider than the result type.

Differential Revision: https://reviews.llvm.org/D88578
The file was modifiedllvm/test/Transforms/InstCombine/bswap.ll
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
Commit 07028cd5dbb8417fb41121a7e75290fab00f65fc by aaron
modernize-use-trailing-return-type fix for PR44206

Prevent rewrite when an unqualified id in a typedef type collides
with a function argument name. Fixes PR44206.
The file was modifiedclang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/modernize-use-trailing-return-type.cpp
Commit 35a2a042ddd127205455fc26ae516ccc513fd5cf by andrzej.warzynski
[flang][NFC] Fix build errors for clang-10

This patch fixes one worning. Since Flang sets `-Werror`, that's
sufficient for a build to fail. As per flang/README.md, Clang-10 is one
of the officially supported compilers.

Differential Revision: https://reviews.llvm.org/D88723
The file was modifiedflang/lib/Lower/OpenACC.cpp
Commit 347fd9955af3fff2622d8349a59974ecc2237ec1 by llvm-dev
[InstCombine] recognizeBSwapOrBitReverseIdiom - use generic CreateIntegerCast

Try to appease buildbots breakages due to D88578
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp