[cfe-commits] r154501 - /cfe/trunk/lib/Sema/SemaOverload.cpp
Richard Smith
richard at metafoo.co.uk
Wed Apr 11 20:05:05 PDT 2012
On Wed, Apr 11, 2012 at 9:08 AM, David Chisnall <csdavec at swan.ac.uk> wrote:
> Author: theraven
> Date: Wed Apr 11 11:08:14 2012
> New Revision: 154501
>
> URL: http://llvm.org/viewvc/llvm-project?rev=154501&view=rev
> Log:
> Clean up last commit as per dgregor's comments.
>
>
> Modified:
> cfe/trunk/lib/Sema/SemaOverload.cpp
>
> Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=154501&r1=154500&r2=154501&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaOverload.cpp Wed Apr 11 11:08:14 2012
> @@ -1316,13 +1316,6 @@
> SCS.setFromType(FromType);
> SCS.CopyConstructor = 0;
>
> - // Allow conversion to _Atomic types. These are C11 and are provided
> as an
> - // extension in C++ mode.
> - if (const AtomicType *ToAtomicType = ToType->getAs<AtomicType>()) {
> - if (ToAtomicType->getValueType() == FromType)
> - return true;
> - }
> -
> // There are no standard conversions for class types in C++, so
> // abort early. When overloading in C, however, we do permit
> if (FromType->isRecordType() || ToType->isRecordType()) {
> @@ -1527,6 +1520,13 @@
> SCS, CStyle)) {
> SCS.Second = ICK_TransparentUnionConversion;
> FromType = ToType;
> + } else if (const AtomicType *ToAtomicType =
> ToType->getAs<AtomicType>()) {
> + // Allow conversion to _Atomic types. These are C11 and are provided
> as an
> + // extension in C++ mode.
> + if (S.Context.hasSameUnqualifiedType(ToAtomicType->getValueType(),
> + FromType))
> + SCS.Second = ICK_Identity;
> + FromType = ToType;
>
Did you intend for there to be braces around these statements?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120411/422e2206/attachment.html>
More information about the cfe-commits
mailing list