[cfe-commits] r45148 - /cfe/trunk/Sema/SemaExpr.cpp

Steve Naroff snaroff at apple.com
Mon Dec 17 20:06:57 PST 2007


Author: snaroff
Date: Mon Dec 17 22:06:57 2007
New Revision: 45148

URL: http://llvm.org/viewvc/llvm-project?rev=45148&view=rev
Log:

Add DefaultFunctionArrayConversion() to the indirection operator in Sema::ActOnUnaryOp().

This fixes a bug Chris forwarded from Oliver Hunt...

typedef struct { char name[100]; } entry;
char f1(entry *e) { return *e->name; }


Modified:
    cfe/trunk/Sema/SemaExpr.cpp

Modified: cfe/trunk/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaExpr.cpp?rev=45148&r1=45147&r2=45148&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/Sema/SemaExpr.cpp Mon Dec 17 22:06:57 2007
@@ -1824,6 +1824,7 @@
     resultType = CheckAddressOfOperand(Input, OpLoc);
     break;
   case UnaryOperator::Deref: 
+    DefaultFunctionArrayConversion(Input);
     resultType = CheckIndirectionOperand(Input, OpLoc);
     break;
   case UnaryOperator::Plus:





More information about the cfe-commits mailing list