<div class="gmail_quote">On Wed, Apr 11, 2012 at 9:08 AM, David Chisnall <span dir="ltr"><<a href="mailto:csdavec@swan.ac.uk">csdavec@swan.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: theraven<br>
Date: Wed Apr 11 11:08:14 2012<br>
New Revision: 154501<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=154501&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=154501&view=rev</a><br>
Log:<br>
Clean up last commit as per dgregor's comments.<br>
<br>
<br>
Modified:<br>
    cfe/trunk/lib/Sema/SemaOverload.cpp<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaOverload.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=154501&r1=154500&r2=154501&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=154501&r1=154500&r2=154501&view=diff</a><br>

==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Wed Apr 11 11:08:14 2012<br>
@@ -1316,13 +1316,6 @@<br>
   SCS.setFromType(FromType);<br>
   SCS.CopyConstructor = 0;<br>
<br>
-  // Allow conversion to _Atomic types.  These are C11 and are provided as an<br>
-  // extension in C++ mode.<br>
-  if (const AtomicType *ToAtomicType = ToType->getAs<AtomicType>()) {<br>
-    if (ToAtomicType->getValueType() == FromType)<br>
-      return true;<br>
-  }<br>
-<br>
   // There are no standard conversions for class types in C++, so<br>
   // abort early. When overloading in C, however, we do permit<br>
   if (FromType->isRecordType() || ToType->isRecordType()) {<br>
@@ -1527,6 +1520,13 @@<br>
                                              SCS, CStyle)) {<br>
     SCS.Second = ICK_TransparentUnionConversion;<br>
     FromType = ToType;<br>
+  }  else if (const AtomicType *ToAtomicType = ToType->getAs<AtomicType>()) {<br>
+    // Allow conversion to _Atomic types.  These are C11 and are provided as an<br>
+    // extension in C++ mode.<br>
+    if (S.Context.hasSameUnqualifiedType(ToAtomicType->getValueType(),<br>
+                                         FromType))<br>
+    SCS.Second = ICK_Identity;<br>
+    FromType = ToType;<br></blockquote><div><br></div><div>Did you intend for there to be braces around these statements?</div></div>