diff options
| author | Steve Naroff <snaroff@apple.com> | 2007-08-31 00:32:44 +0000 |
|---|---|---|
| committer | Steve Naroff <snaroff@apple.com> | 2007-08-31 00:32:44 +0000 |
| commit | 43b8f7fa4fee0171bc08b6c72606c74b509bfe26 (patch) | |
| tree | 04ecc89ece1cae4307f393e0424286ae124e8fc4 | |
| parent | ab871baaf81f76b59d48c97d16e4e121504b9807 (diff) | |
| download | bcm5719-llvm-43b8f7fa4fee0171bc08b6c72606c74b509bfe26.tar.gz bcm5719-llvm-43b8f7fa4fee0171bc08b6c72606c74b509bfe26.zip | |
Sema::ParseCastExpr() missing call to UsualUnaryConversions().
The following case now works...
void empty(void * a ) {}
void test()
{
unsigned char A[4];
empty( (void *) A);
}
Thanks to Patrick Flannery for finding this...
llvm-svn: 41630
| -rw-r--r-- | clang/Sema/SemaExpr.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/Sema/SemaExpr.cpp b/clang/Sema/SemaExpr.cpp index 615b2433348..a32e607aa41 100644 --- a/clang/Sema/SemaExpr.cpp +++ b/clang/Sema/SemaExpr.cpp @@ -657,6 +657,8 @@ ParseCastExpr(SourceLocation LParenLoc, TypeTy *Ty, Expr *castExpr = static_cast<Expr*>(Op); QualType castType = QualType::getFromOpaquePtr(Ty); + UsualUnaryConversions(castExpr); + // C99 6.5.4p2: the cast type needs to be void or scalar and the expression // type needs to be scalar. if (!castType->isScalarType() && !castType->isVoidType()) { |

