mstorsjo wrote:

This broke compilation with Xcode Clang 12 (roughly corresponding to upstream 
Clang 10):

```
/Users/mstorsjo/nightly/llvm-mingw/src/llvm-project/clang/lib/Driver/Driver.
cpp:953:14: error: no viable conversion from returned value of type 'SmallVe
ctor<[...], 1>' to function return type 'SmallVector<[...], (default) Calcul
ateSmallVectorDefaultInlinedElements<T>::value aka 2>'
      return GPUArchs;
             ^~~~~~~~
/Users/mstorsjo/nightly/llvm-mingw/src/llvm-project/llvm/include/llvm/ADT/Sm
allVector.h:1227:3: note: candidate constructor not viable: no known convers
ion from 'SmallVector<std::string, 1>' (aka 'SmallVector<basic_string<char>,
 1>') to 'std::initializer_list<basic_string<char>>' for 1st argument
  SmallVector(std::initializer_list<T> IL) : SmallVectorImpl<T>(N) {
  ^
/Users/mstorsjo/nightly/llvm-mingw/src/llvm-project/llvm/include/llvm/ADT/Sm
allVector.h:1237:3: note: candidate constructor not viable: no known convers
ion from 'SmallVector<std::string, 1>' (aka 'SmallVector<basic_string<char>,
 1>') to 'const llvm::SmallVector<std::__1::basic_string<char>, 2> &' for 1s
t argument
  SmallVector(const SmallVector &RHS) : SmallVectorImpl<T>(N) {
  ^
/Users/mstorsjo/nightly/llvm-mingw/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1247:3:
 note: candidate constructor not viable: no known conversion from 
'SmallVector<std::string, 1>' (aka 'SmallVector<basic_string<char>, 1>') to 
'llvm::SmallVector<std::__1::basic_string<char>, 2> &&' for 1st argument
  SmallVector(SmallVector &&RHS) : SmallVectorImpl<T>(N) {
  ^
/Users/mstorsjo/nightly/llvm-mingw/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1252:3:
 note: candidate constructor not viable: no known conversion from 
'SmallVector<std::string, 1>' (aka 'SmallVector<basic_string<char>, 1>') to 
'SmallVectorImpl<std::__1::basic_string<char>> &&' for 1st argument
  SmallVector(SmallVectorImpl<T> &&RHS) : SmallVectorImpl<T>(N) {
  ^
/Users/mstorsjo/nightly/llvm-mingw/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1206:12:
 note: explicit constructor is not a candidate
  explicit SmallVector(size_t Size)
           ^
/Users/mstorsjo/nightly/llvm-mingw/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1222:12:
 note: explicit constructor is not a candidate
  explicit SmallVector(const iterator_range<RangeTy> &R)
           ^
/Users/mstorsjo/nightly/llvm-mingw/src/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1233:12:
 note: explicit constructor is not a candidate
  explicit SmallVector(ArrayRef<U> A) : SmallVectorImpl<T>(N) {
           ^
/Users/mstorsjo/nightly/llvm-mingw/src/llvm-project/clang/lib/Driver/Driver.cpp:958:14:
 warning: local variable 'GPUArchs' will be copied despite being returned by 
name [-Wreturn-std-move]
      return GPUArchs;
             ^~~~~~~~
/Users/mstorsjo/nightly/llvm-mingw/src/llvm-project/clang/lib/Driver/Driver.cpp:958:14:
 note: call 'std::move' explicitly to avoid copying
      return GPUArchs;
             ^~~~~~~~
             std::move(GPUArchs)
```

Plus another few similar cases (on lines 953, 958 and 967).

https://github.com/llvm/llvm-project/pull/125556
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to