| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).
llvm-svn: 91446
|
| |
|
|
| |
llvm-svn: 90647
|
| |
|
|
| |
llvm-svn: 90070
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 81802
|
| |
|
|
|
|
|
| |
Also, enable them in sema so that they are tested, and now that the x86 backend
has stablized.
llvm-svn: 74983
|
| |
|
|
|
|
|
|
| |
-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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
| |
extension.
llvm-svn: 69100
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
disable this feature for now, to err on the side of rejecting instead
of sometimes crashing. rdar://6326239
llvm-svn: 68088
|
| |
|
|
|
|
|
|
|
| |
disabled but are used anyway
by changing blocks from being disabled in the parser to being disabled
in Sema.
llvm-svn: 67816
|
| |
|
|
|
|
| |
Tests and drivers updated, still need to shuffle dirs.
llvm-svn: 67602
|
| |
|
|
| |
llvm-svn: 66416
|
| |
|
|
| |
llvm-svn: 66388
|
| |
|
|
| |
llvm-svn: 66387
|
| |
|
|
|
|
|
|
|
| |
assignment (+=)"
warning to only trigger when there is whitespace or something else after the + as
suggested by Eli.
llvm-svn: 66370
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
just silently return an error to avoid bogus diagnostics.
llvm-svn: 64491
|
| |
|
|
| |
llvm-svn: 62936
|
| |
|
|
|
|
| |
different than those for sizeof. Reject alignof(bitfield) like gcc does.
llvm-svn: 62928
|
| |
|
|
| |
llvm-svn: 60927
|
| |
|
|
| |
llvm-svn: 60924
|
| |
|
|
| |
llvm-svn: 59877
|
| |
|
|
| |
llvm-svn: 59829
|
| |
|
|
|
|
|
| |
are trying to use the old GCC "casts as lvalue" extension. We don't and
will hopefully never support this.
llvm-svn: 59460
|
| |
|
|
|
|
| |
"+=".
llvm-svn: 55131
|
| |
|
|
| |
llvm-svn: 54033
|
|
|
scope. This is part of the fix for PR1966
llvm-svn: 46669
|