================
@@ -18,6 +18,132 @@
 #include "llvm/Support/AtomicOrdering.h"
 #include <cstdint>
 
+namespace {
+
+using llvm::StringRef;
+using namespace clang;
+
+/// Attempts to apply a user-defined conversion on Arg at ArgIndex to a
+/// 32-bit-compatible type. If successful, updates TheCall's argument. Returns
+/// true if a suitable conversion was applied.
+bool tryUserDefinedConversion32Bit(Sema &SemaRef, Expr *Arg, CallExpr *TheCall,
+                                   unsigned ArgIndex) {
+  const CXXRecordDecl *RecordDecl = Arg->getType()->getAsCXXRecordDecl();
+  if (!RecordDecl)
+    return false;
+
+  // Iterate over class conversion operators and pick the first that yields a
+  // 32-bit type.
+  for (auto *MethodDecl : RecordDecl->methods()) {
----------------
shiltian wrote:

no auto for this case

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

Reply via email to