Daniel Dunbar
a7d0231b66
clang -cc1: Rename -mcpu to -target-cpu to match other target options and not alias driver/backend option.
...
llvm-svn: 91671
2009-12-18 06:30:12 +00:00
Eli Friedman
fa7f519ce4
Temporarily XFAIL this test.
...
llvm-svn: 91643
2009-12-18 00:23:19 +00:00
Mike Stump
6dc04f4067
Revert r91073.
...
llvm-svn: 91629
2009-12-17 22:14:41 +00:00
Nuno Lopes
e9823fab83
implement PR3962: diagnose more faulty cases of usage of the restrict qualifier. this also removes a FIXME
...
llvm-svn: 91601
2009-12-17 11:35:26 +00:00
Daniel Dunbar
5618e98f33
Update tests to use %clang instead of 'clang', and forcibly disable use of '
...
clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to
garbage).
llvm-svn: 91460
2009-12-15 22:01:24 +00:00
Daniel Dunbar
8fbe78f6fc
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
...
- 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
2009-12-15 20:14:24 +00:00
Nate Begeman
ac8183a830
Support OpenCL 1.1 odd-length vector component accessors.
...
For hi/odd of an odd-length vector, the last component is undefined. Since
we shuffle with an undef vector, no CodeGen needs to change to support this.
llvm-svn: 91437
2009-12-15 18:13:04 +00:00
Mike Stump
4ec1237106
Add testcase for recent checkin.
...
Patch by Chip Davis.
llvm-svn: 91436
2009-12-15 18:02:45 +00:00
Fariborz Jahanian
a01b67d7b0
Make tests use the new clang -cc1 flag.
...
llvm-svn: 91303
2009-12-14 18:00:56 +00:00
Mike Stump
18f4196792
Testcase for recent checkin.
...
llvm-svn: 91080
2009-12-11 00:10:15 +00:00
Mike Stump
e1f6280093
Don't complain about falling off the end of a function with an asm
...
block, if the function is supposed to return a value as we don't know
exactly what the asm code does.
llvm-svn: 91073
2009-12-10 22:57:48 +00:00
John McCall
5677499fbf
First pass at implementing C++ enum semantics: calculate (and store) an
...
"integer promotion" type associated with an enum decl, and use this type to
determine which type to promote to. This type obeys C++ [conv.prom]p2 and
is therefore generally signed unless the range of the enumerators forces
it to be unsigned.
Kills off a lot of false positives from -Wsign-compare in C++, addressing
rdar://7455616
llvm-svn: 90965
2009-12-09 09:09:27 +00:00
Eli Friedman
d0e8de2cd8
Move RequireCompleteType requirement for fields early into ActOnField so that
...
subsequent code which depends on a complete type does the right thing.
llvm-svn: 90727
2009-12-07 00:22:08 +00:00
Chris Lattner
9a152e2570
fix rdar://7446395, a crash on invalid, by fixing a broken assertion.
...
llvm-svn: 90647
2009-12-05 05:40:13 +00:00
John Thompson
47981226d5
Fix for PR5650 - Revised vector_size attribute handling to be done earlier before declaration is finalized.
...
llvm-svn: 90600
2009-12-04 21:51:28 +00:00
Eli Friedman
f3da334da6
Fix for PR5447: teach Evaluate to deal with floating-point conditionals.
...
llvm-svn: 90521
2009-12-04 02:12:53 +00:00
Eli Friedman
5efba264cb
Fix for PR5679: make __builtin_prefetch a bit more flexible in what it accepts
...
as a constant integer. Also, some minor cleanup and improvements to the
diagnostics.
llvm-svn: 90504
2009-12-04 00:30:06 +00:00
Daniel Dunbar
be95682389
Remove unnecessary -fblocks=0.
...
llvm-svn: 90070
2009-11-29 09:32:38 +00:00
Douglas Gregor
3ff3af4ff9
When the condition of a switch() statement is semantically invalid,
...
still parse the body of the switch to try to avoid spurious
diagnostics. Fixes PR5606.
llvm-svn: 89847
2009-11-25 06:20:02 +00:00
Fariborz Jahanian
3f21c159dc
Fix a recent regression probably caused by addition of altivec-style
...
type-casts in the parser.
llvm-svn: 89691
2009-11-23 19:51:43 +00:00
Edward O'Callaghan
0825f09306
Fix for PR5233.
...
llvm-svn: 89603
2009-11-22 16:21:47 +00:00
Daniel Dunbar
32164f4bdb
Driver: Use '-target-abi' 'FOO' instead of '-target-abi=FOO'.
...
llvm-svn: 89501
2009-11-20 22:32:30 +00:00
Daniel Dunbar
4274685b63
Pass '-mcpu' 'FOO' instead of '-mcpu=FOO'.
...
llvm-svn: 89498
2009-11-20 22:21:52 +00:00
Daniel Dunbar
484afa2d3b
Switch -f{builtin,math-errno,rtti} and -analyzer-purge-dead to -...no... variants instead of using llvm: 🆑 :init(true) arguments.
...
llvm-svn: 89315
2009-11-19 04:55:23 +00:00
Benjamin Kramer
b70e4aba9a
Make test header independent so it doesn't fail on freebsd. I hope this doesn't
...
hurt the intention of the test.
llvm-svn: 89096
2009-11-17 14:02:16 +00:00
Daniel Dunbar
633d5b3ee2
Use clang to run tests which include headers from the system.
...
llvm-svn: 89085
2009-11-17 10:14:55 +00:00
Daniel Dunbar
feedba68b5
Don't #include <stdio.h> when tests don't need it, or use clang instead of clang-cc when they do.
...
llvm-svn: 89070
2009-11-17 08:57:36 +00:00
Eli Friedman
141fbf3f36
Add constant evaluation for comma operator with floating-point operand. Fixes
...
PR5449.
llvm-svn: 88885
2009-11-16 04:25:37 +00:00
John McCall
5055e4cdfd
Fix PR 5422: handle lvalue results when evaluating 'based' ptrtoints as part of
...
the -Wconversion check.
llvm-svn: 86891
2009-11-11 22:52:37 +00:00
Fariborz Jahanian
b98dade25b
Changed error for nested type qualifier mismatch to
...
warning, to match gcc. It used to be warning, so
better keep it a warning (it broke a certain project).
llvm-svn: 86597
2009-11-09 22:16:37 +00:00
Fariborz Jahanian
222c0b517e
Test case for Sean Hunt's patch which I left out.
...
llvm-svn: 86573
2009-11-09 18:48:53 +00:00
Eli Friedman
e4310c8273
Add support for cdecl attribute. (As far as I know, it doesn't affect CodeGen
...
unless we start implementing command-line switches which override the default
calling convention, so the effect is mostly to silence unknown attribute
warnings.)
llvm-svn: 86571
2009-11-09 18:38:53 +00:00
Anders Carlsson
2256497780
Add a triple to try to fix the buildbot error.
...
llvm-svn: 86563
2009-11-09 17:54:53 +00:00
Anders Carlsson
69999d9c23
__uint128_t is indeed an unsigned integer type. Fixes PR5435.
...
llvm-svn: 86561
2009-11-09 17:34:18 +00:00
Daniel Dunbar
8b57697954
Eliminate &&s in tests.
...
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.
llvm-svn: 86430
2009-11-08 01:45:36 +00:00
John McCall
b61e9d03c1
Support -Wshorten-64-to-32 for integer types only, which seems to satisfy the
...
core requirements. Fixes rdar://problem/6389954
llvm-svn: 86364
2009-11-07 09:03:53 +00:00
John McCall
b397956338
Improve -Wconversion by permitting binary operations on values of the target
...
type (or smaller) to stay "closed" within the type.
llvm-svn: 86356
2009-11-07 08:15:46 +00:00
John McCall
554e857cf4
Test case for -Wconversion.
...
llvm-svn: 86327
2009-11-07 03:30:38 +00:00
John McCall
e46fd8531c
compare.c also needs a target triple now, and improve some comments while we're
...
at it.
llvm-svn: 86243
2009-11-06 08:53:51 +00:00
John McCall
99ce6bfe28
Improve the -Wsign-compare heuristics:
...
* If the unsigned type is smaller than the signed type, never warn, because
its value will not change when zero-extended to the larger type.
* If we're testing for (in)equality, and the unsigned value is an integer
constant whose sign bit is not set, never warn, because even though the
signed value might change, it can't affect the result of the equality.
Also make the comparison test cases much more rigorous, and have them expose
the subtle differences between C and C++ here.
llvm-svn: 86242
2009-11-06 08:49:08 +00:00
Douglas Gregor
6af6c3ee56
Turn off -Wsign-compare warnings by default
...
llvm-svn: 86233
2009-11-06 05:24:12 +00:00
Sebastian Redl
87869bc435
Make ASTContext::getIntWidth return 1 for all boolean type variations, not just for the unqualified, unaliased bool.
...
llvm-svn: 86174
2009-11-05 21:10:57 +00:00
John Thompson
ed4e2950bc
Adding -fshort-wchar option.
...
llvm-svn: 86167
2009-11-05 20:14:16 +00:00
John McCall
1fa36b7cab
Implement the conditional-operator part of -Wsign-compare. Turn
...
DiagnoseSignCompare into Sema::CheckSignCompare and call it from more places.
Add some enumerator tests. These seem to expose some oddities in the
types we're converting C++ enumerators to; in particular, they're converting
to unsigned before int, which seems to contradict 4.5 [conv.prom] p2.
Note to self: stop baiting Doug in my commit messages.
llvm-svn: 86128
2009-11-05 09:23:39 +00:00
John McCall
644a4181c9
Implement -Wsign-compare, or at least the actual comparison part of it.
...
Conditional operands are next.
Fixes part of rdar://problem/7289584.
llvm-svn: 86083
2009-11-05 00:40:04 +00:00
John McCall
4976fd4ea9
Diagnose the use of 'fastcall' on functions without prototypes or with
...
varargs prototypes.
llvm-svn: 86001
2009-11-04 03:36:09 +00:00
John McCall
9eff4e60ae
Diagnose __builtin_offsetof on incomplete types. Fixes
...
rdar://problem/7222956
llvm-svn: 85999
2009-11-04 03:03:43 +00:00
John McCall
28a6aeab7e
Change our basic strategy for avoiding deprecation warnings when the decl use
...
appears in a deprecated context. In the new strategy, we emit the warnings
as usual unless we're currently parsing a declaration, where "declaration" is
restricted to mean a decl group or a few special cases in Objective C. If
we *are* parsing a declaration, we queue up the deprecation warnings until
the declaration has been completely parsed, and then emit them only if the
decl is not deprecated.
We also standardize the bookkeeping for deprecation so as to avoid special cases.
llvm-svn: 85998
2009-11-04 02:18:39 +00:00
John McCall
d5a36321b9
Reorganize the parsing of decl groups / function definitions so that
...
declarators are parsed primarily within a single function (at least for
these cases). Remove some excess diagnostics arising during parse failures.
llvm-svn: 85924
2009-11-03 19:26:08 +00:00
Douglas Gregor
bff4e7d180
Fix the type of __builtin_expect, from Ed Schouten!
...
llvm-svn: 85666
2009-10-31 16:04:14 +00:00