From 1f3a72baf282a0f9b68c3e570a9d7b22750becc1 Mon Sep 17 00:00:00 2001
From: dim <dim@FreeBSD.org>
Date: Sat, 19 Nov 2011 17:09:36 +0000
Subject: Pull in r144110 from upstream clang trunk:

Mark the overloaded atomic builtins as having custom type checking,
which they do. This avoids all of the default argument promotions that
we (1) don't want, and (2) undo during that custom type checking, and
makes sure that we don't run into trouble during template
instantiation. Fixes llvm/clang PR11320.

MFC after:	1 week
---
 contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp | 8 --------
 1 file changed, 8 deletions(-)

(limited to 'contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp')

diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp
index eaf7bfa..a6c49bb 100644
--- a/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp
+++ b/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp
@@ -803,14 +803,6 @@ Sema::SemaBuiltinAtomicOverloaded(ExprResult TheCallResult) {
   for (unsigned i = 0; i != NumFixed; ++i) {
     ExprResult Arg = TheCall->getArg(i+1);
 
-    // If the argument is an implicit cast, then there was a promotion due to
-    // "...", just remove it now.
-    if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Arg.get())) {
-      Arg = ICE->getSubExpr();
-      ICE->setSubExpr(0);
-      TheCall->setArg(i+1, Arg.get());
-    }
-
     // GCC does an implicit conversion to the pointer or integer ValType.  This
     // can fail in some cases (1i -> int**), check for this error case now.
     // Initialize the argument.
-- 
cgit v1.1