- Oct 20, 2009
-
-
Chris Lattner authored
implements a framework that allows us to use information about previously substituted values to simplify subsequent ones. Maybe this would be useful for C++'y stuff, who knows. We now get: t.c:4:21: error: invalid operands to binary expression ('size_t' (aka 'unsigned long *') and 'size_t') return (size_t) 0 + (size_t) 0; ~~~~~~~~~~ ^ ~~~~~~~~~~ on the testcase. Note that size_t is only aka'd once. llvm-svn: 84604
-
- Sep 15, 2009
-
-
Anders Carlsson authored
llvm-svn: 81802
-
- Jul 08, 2009
-
-
Chris Lattner authored
Also, enable them in sema so that they are tested, and now that the x86 backend has stablized. llvm-svn: 74983
-
- May 22, 2009
-
-
Argyrios Kyrtzidis authored
-Makes typeof consistent with sizeof/alignof -Fixes a bug when '>' is in a typeof expression, inside a template type param: A<typeof(x>1)> a; llvm-svn: 72255
-
- Apr 28, 2009
-
-
Eli Friedman authored
scheme to be more useful. The new scheme introduces a set of categories that should be more readable, and also reflects what we want to consider as an extension more accurately. Specifically, it makes the "what is a keyword" determination accurately reflect whether the keyword is a GNU or Microsoft extension. I also introduced separate flags for keyword aliases; this is useful because the classification of the aliases is mostly unrelated to the classification of the original keyword. This patch treats anything that's in the implementation namespace (prefixed with "__", or "_X" where "X" is any upper-case letter) as a keyword without marking it as an extension. This is consistent with the standards in that an implementation is allowed to define arbitrary extensions in the implementation namespace without violating the standard. This gets rid of all the nasty "extension used" warnings for stuff like __attribute__ in -pedantic mode. We still warn for extensions outside of the the implementation namespace, like typeof. If someone wants to implement -Wextensions or something like that, we could add additional information to the keyword table. This also removes processing for the unused "Boolean" language option; such an extension isn't supported on any other C implementation, so I don't see any point to adding it. The changes to test/CodeGen/inline.c are required because previously, we weren't actually disabling the "inline" keyword in -std=c89 mode. I'll remove Boolean and NoExtensions from LangOptions in a follow-up commit. llvm-svn: 70281
-
- Apr 15, 2009
-
-
Daniel Dunbar authored
- Strip off extra parens when looking for casts. - Change the location info to point at the cast (instead of the assignment). For example, on int *b; #define a ((void*) b) void f0() { a = 10; } we now emit: /tmp/t.c:4:3: error: assignment to cast is illegal, lvalue casts are not supported a = 10; ^ ~ /tmp/t.c:2:12: note: instantiated from: #define a ((void*) b) ~^~~~~~~~~~ instead of: /tmp/t.c:4:5: error: expression is not assignable a = 10; ~ ^ llvm-svn: 69114
-
Daniel Dunbar authored
extension. llvm-svn: 69100
-
- Apr 07, 2009
-
-
Daniel Dunbar authored
clang. - We will eventually want some more driver infrastructre for this probably. - For now, the clang-cc interface stays relatively the same, but we don't accept multiple instances anymore, or the [no-] variants directly. llvm-svn: 68550
-
- Mar 31, 2009
-
-
Chris Lattner authored
disable this feature for now, to err on the side of rejecting instead of sometimes crashing. rdar://6326239 llvm-svn: 68088
-
- Mar 27, 2009
-
-
rdar://6719156Chris Lattner authored
by changing blocks from being disabled in the parser to being disabled in Sema. llvm-svn: 67816
-
- Mar 24, 2009
-
-
Daniel Dunbar authored
Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
-
- Mar 09, 2009
-
-
Chris Lattner authored
llvm-svn: 66416
-
- Mar 08, 2009
-
-
Chris Lattner authored
llvm-svn: 66388
-
Chris Lattner authored
llvm-svn: 66387
-
Chris Lattner authored
warning to only trigger when there is whitespace or something else after the + as suggested by Eli. llvm-svn: 66370
-
- Feb 20, 2009
-
-
Chris Lattner authored
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
-
- Feb 13, 2009
-
-
Chris Lattner authored
just silently return an error to avoid bogus diagnostics. llvm-svn: 64491
-
- Jan 24, 2009
-
-
Chris Lattner authored
llvm-svn: 62936
-
Chris Lattner authored
different than those for sizeof. Reject alignof(bitfield) like gcc does. llvm-svn: 62928
-
- Dec 12, 2008
-
-
Chris Lattner authored
llvm-svn: 60927
-
-
- Nov 22, 2008
-
-
Chris Lattner authored
llvm-svn: 59877
-
- Nov 21, 2008
-
-
Chris Lattner authored
llvm-svn: 59829
-
- Nov 17, 2008
-
-
rdar://6319320Chris Lattner authored
are trying to use the old GCC "casts as lvalue" extension. We don't and will hopefully never support this. llvm-svn: 59460
-
- Aug 21, 2008
-
-
Chris Lattner authored
"+=". llvm-svn: 55131
-
- Jul 25, 2008
-
-
- Feb 02, 2008
-
-
Chris Lattner authored
scope. This is part of the fix for PR1966 llvm-svn: 46669
-