[llvm-branch-commits] [cfe-branch] r112957 - in /cfe/branches/Apple/whitney-IB/src/tools/clang: ./ lib/CodeGen/CGExprScalar.cpp test/CodeGen/_Bool-conversion.c

Daniel Dunbar daniel at zuster.org
Fri Sep 3 07:56:43 PDT 2010


Author: ddunbar
Date: Fri Sep  3 09:56:43 2010
New Revision: 112957

URL: http://llvm.org/viewvc/llvm-project?rev=112957&view=rev
Log:
--- Merging r112943 into 'src/tools/clang':
U    src/tools/clang/test/CodeGen/_Bool-conversion.c
U    src/tools/clang/lib/CodeGen/CGExprScalar.cpp


Modified:
    cfe/branches/Apple/whitney-IB/src/tools/clang/   (props changed)
    cfe/branches/Apple/whitney-IB/src/tools/clang/lib/CodeGen/CGExprScalar.cpp
    cfe/branches/Apple/whitney-IB/src/tools/clang/test/CodeGen/_Bool-conversion.c

Propchange: cfe/branches/Apple/whitney-IB/src/tools/clang/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep  3 09:56:43 2010
@@ -1,2 +1,2 @@
-/cfe/trunk:112263,112268,112274,112914,112917
+/cfe/trunk:112263,112268,112274,112914,112917,112943
 /llvm/branches/Apple/Pertwee/tools/clang:110850,110961

Modified: cfe/branches/Apple/whitney-IB/src/tools/clang/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney-IB/src/tools/clang/lib/CodeGen/CGExprScalar.cpp?rev=112957&r1=112956&r2=112957&view=diff
==============================================================================
--- cfe/branches/Apple/whitney-IB/src/tools/clang/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/branches/Apple/whitney-IB/src/tools/clang/lib/CodeGen/CGExprScalar.cpp Fri Sep  3 09:56:43 2010
@@ -1032,7 +1032,7 @@
 
     // Handle conversion to bool correctly.
     if (DestTy->isBooleanType())
-      return EmitScalarConversion(Visit(E), E->getType(), DestTy);
+      return EmitScalarConversion(Src, E->getType(), DestTy);
 
     return Builder.CreatePtrToInt(Src, ConvertType(DestTy));
   }

Modified: cfe/branches/Apple/whitney-IB/src/tools/clang/test/CodeGen/_Bool-conversion.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney-IB/src/tools/clang/test/CodeGen/_Bool-conversion.c?rev=112957&r1=112956&r2=112957&view=diff
==============================================================================
--- cfe/branches/Apple/whitney-IB/src/tools/clang/test/CodeGen/_Bool-conversion.c (original)
+++ cfe/branches/Apple/whitney-IB/src/tools/clang/test/CodeGen/_Bool-conversion.c Fri Sep  3 09:56:43 2010
@@ -6,3 +6,7 @@
 
 static _Bool f0_0(void *a0) { return (_Bool) a0; }
 int f0() { return f0_0((void*) 0x2); }
+
+_Bool f1(void) {
+  return (_Bool) ({ void (*x)(); x = 0; });
+}





More information about the llvm-branch-commits mailing list