[PATCH] D53417: [Clang][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 19 19:04:24 PDT 2018


hubert.reinterpretcast requested changes to this revision.
hubert.reinterpretcast added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/lib/Sema/SemaOverload.cpp:3920
+
+  // Prefer a compatible vector conversion to lax vector conversion
+  // For example:
----------------
s/to/over a/;


================
Comment at: clang/lib/Sema/SemaOverload.cpp:3941
+      return ImplicitConversionSequence::Better;
+  }
+
----------------
This seems to duplicate the bug described here in https://bugs.llvm.org/show_bug.cgi?id=39361.
```
typedef unsigned int GccType __attribute__((__vector_size__(16)));
typedef __vector unsigned int AltiVecType;

typedef float GccOtherType __attribute__((__vector_size__(16)));

char *f(GccOtherType, int);
template <typename T> int f(AltiVecType, T);
template <typename T> int g(AltiVecType, T);
char *g(GccOtherType, int);

bool zip(GccType v) { return f(v, 0) == g(v, 0); }
```


Repository:
  rC Clang

https://reviews.llvm.org/D53417





More information about the cfe-commits mailing list