Commit Graph

5 Commits

Author SHA1 Message Date
Steve Naroff f631ae2cf8 Tweak fix for http://llvm.org/bugs/show_bug.cgi?id=2000 to work across typedefs.
llvm-svn: 47269
2008-02-18 15:14:59 +00:00
Steve Naroff 1018ea35b7 Refine bug fix to Expr::isLvalue (commit r46917).
llvm-svn: 46919
2008-02-10 01:39:04 +00:00
Steve Naroff 43c50866f1 Change Expr::isLvalue() to allow the "void" type. This fixes bz2000 submitted by Neil Booth.
Neil, can you point me to the place in the C99 spec that says this is allowed? I thought Expr::isLvalue() conformed to the spec, which says "C99 6.3.2.1: an lvalue is an expression with an object type or an incomplete type other than void.". Please advise.

llvm-svn: 46917
2008-02-10 00:30:18 +00:00
Steve Naroff b716fbab44 Sema::FinalizeDeclaratorGroup()...make sure we emit an diagnostic for tentative definitions with incomplete types. Touch up all test cases that are effected.
llvm-svn: 46152
2008-01-18 00:39:39 +00:00
Steve Naroff 826e91ae04 Change Sema::CheckAddressOfOperation() to respect C99-only addressof rules.
Remove diagnostics from Sema::CheckIndirectionOperand(). C89/C99 allow dereferencing an incomplete type. clang appears to be emulating some incorrect gcc behavior (see below).

void
foo (void)
{
 struct b;
 struct b* x = 0;
 struct b* y = &*x; // gcc produces an error ("dereferencing pointer to incomplete type")
}

With this patch, the above is now allowed.

Bug/Patch by Eli Friedman!

llvm-svn: 45933
2008-01-13 17:10:08 +00:00