Chris Lattner
9eac931b5f
Fix rdar://6719156 - clang should emit a better error when blocks are disabled but are used anyway
...
by changing blocks from being disabled in the parser to being disabled
in Sema.
llvm-svn: 67816
2009-03-27 04:18:06 +00:00
Daniel Dunbar
a45cf5b6b0
Rename clang to clang-cc.
...
Tests and drivers updated, still need to shuffle dirs.
llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Chris Lattner
ed9f14c4c9
do not warn about -=/=- confusion with macros, thanks to rdogra for a testcase.
...
llvm-svn: 66416
2009-03-09 07:11:10 +00:00
Chris Lattner
40dc267160
undefined -> unspecified. Thanks Mike.
...
llvm-svn: 66388
2009-03-08 19:52:14 +00:00
Chris Lattner
222b8bd6ad
implement PR3753, warning about comparisons with a string literal.
...
llvm-svn: 66387
2009-03-08 19:39:53 +00:00
Chris Lattner
36c39c9b0a
refine the "use of unary operator that may be intended as compound assignment (+=)"
...
warning to only trigger when there is whitespace or something else after the + as
suggested by Eli.
llvm-svn: 66370
2009-03-08 06:51:10 +00:00
Chris Lattner
810d330cd3
Fix a long standard problem with clang retaining "too much" sugar
...
information about types. We often print diagnostics where we say
"foo_t" is bad, but the user doesn't know how foo_t is declared
(because it is a typedef). Fix this by expanding sugar when present
in a diagnostic (and not one of a few special cases, like vectors).
Before:
t.m:5:2: error: invalid operands to binary expression ('typeof(P)' and 'typeof(F)')
MAX(P, F);
^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
^
After:
t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
MAX(P, F);
^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
^
llvm-svn: 65081
2009-02-19 23:45:49 +00:00
Chris Lattner
303284acfc
If x is an invalid field decl, don't construct an expression for P->x,
...
just silently return an error to avoid bogus diagnostics.
llvm-svn: 64491
2009-02-13 22:08:30 +00:00
Chris Lattner
5eca6ada3a
Implement C99 6.5.3.4p1, rejecting sizeof(bitfield)
...
llvm-svn: 62936
2009-01-24 21:29:22 +00:00
Chris Lattner
8dff017695
Fix PR3386 by handling GCC's rules for alignof, which are substantially
...
different than those for sizeof. Reject alignof(bitfield) like gcc does.
llvm-svn: 62928
2009-01-24 20:17:12 +00:00
Chris Lattner
dca17ceb19
add expected diag
...
llvm-svn: 60927
2008-12-12 05:59:56 +00:00
Chris Lattner
053441f39d
Fix rdar://6095061 - gcc allows __builtin_choose_expr as an lvalue
...
llvm-svn: 60924
2008-12-12 05:35:08 +00:00
Chris Lattner
8cd9b96ee1
add a silly testcase
...
llvm-svn: 59877
2008-11-22 19:57:03 +00:00
Chris Lattner
40bb0c83d4
print a type in a diagnostic.
...
llvm-svn: 59829
2008-11-21 18:27:34 +00:00
Chris Lattner
9b3bbe9db7
Implement rdar://6319320: give a good diagnostic for cases where people
...
are trying to use the old GCC "casts as lvalue" extension. We don't and
will hopefully never support this.
llvm-svn: 59460
2008-11-17 19:51:54 +00:00
Chris Lattner
ea71438a93
add a simple check to warn people who type "=+" when they probably meant
...
"+=".
llvm-svn: 55131
2008-08-21 18:04:13 +00:00
Chris Lattner
ec8996d771
Add support for __extension__ as an lvalue. rdar://6097308
...
llvm-svn: 54033
2008-07-25 18:07:19 +00:00
Chris Lattner
c43926fe67
Implement support for __extension__ which silences extwarnings in its
...
scope. This is part of the fix for PR1966
llvm-svn: 46669
2008-02-02 20:20:10 +00:00