[all-commits] [llvm/llvm-project] a4ee55: [MLIR][NFC] Fix build on recent GCC with C++20 ena...

Alexander Batashev via All-commits all-commits at lists.llvm.org
Fri Nov 24 04:13:53 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a4ee55fe6ea088f55bf44236bd05f6a847a3de6c
      https://github.com/llvm/llvm-project/commit/a4ee55fe6ea088f55bf44236bd05f6a847a3de6c
  Author: Alexander Batashev <alexbatashev at gmail.com>
  Date:   2023-11-24 (Fri, 24 Nov 2023)

  Changed paths:
    M mlir/lib/Conversion/ComplexToLibm/ComplexToLibm.cpp
    M mlir/lib/Conversion/MathToLibm/MathToLibm.cpp
    M mlir/lib/Conversion/SCFToSPIRV/SCFToSPIRV.cpp
    M mlir/lib/Pass/PassRegistry.cpp

  Log Message:
  -----------
  [MLIR][NFC] Fix build on recent GCC with C++20 enabled (#73308)

The following pattern fails on recent GCC versions with -std=c++20 flag
passed and succeeds with -std=c++17. Such behavior is not observed on
Clang 16.0.

```
template <typename T>
struct Foo {
    Foo<T>(int a) {}
};
```

This patch removes template parameter from constructor in two occurences
to make the following command complete successfully:
bazel build -c fastbuild --cxxopt=-std=c++20 --host_cxxopt=-std=c++20
@llvm-project//mlir/...

This patch is similar to https://reviews.llvm.org/D154782

Co-authored-by: Alexander Batashev <a.batashev at partner.samsung.com>




More information about the All-commits mailing list