]> granicus.if.org Git - clang/commitdiff
Add DefaultFunctionArrayConversion() to the indirection operator in Sema::ActOnUnaryOp().
authorSteve Naroff <snaroff@apple.com>
Tue, 18 Dec 2007 04:06:57 +0000 (04:06 +0000)
committerSteve Naroff <snaroff@apple.com>
Tue, 18 Dec 2007 04:06:57 +0000 (04:06 +0000)
This fixes a bug Chris forwarded from Oliver Hunt...

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45148 91177308-0d34-0410-b5e6-96231b3b80d8

Sema/SemaExpr.cpp

index e5f748fa66796092ba91fbce605a7be6c7292bab..8eedd37fe50151997ab90a8281f5119a8d02fe19 100644 (file)
@@ -1824,6 +1824,7 @@ Action::ExprResult Sema::ActOnUnaryOp(SourceLocation OpLoc, tok::TokenKind Op,
     resultType = CheckAddressOfOperand(Input, OpLoc);
     break;
   case UnaryOperator::Deref: 
+    DefaultFunctionArrayConversion(Input);
     resultType = CheckIndirectionOperand(Input, OpLoc);
     break;
   case UnaryOperator::Plus: