Chris Lattner
9e137aad78
fix a couple switch codegen problems Oliver reported.
...
llvm-svn: 44484
2007-12-01 05:27:33 +00:00
Anders Carlsson
801c5c7467
GCC has an extension where the left hand side of the ? : operator can be omitted. Handle this in a few more places.
...
llvm-svn: 44462
2007-11-30 19:04:31 +00:00
Chris Lattner
1386de8757
fix a bug handling typedefs in member expr codegen. Patch
...
by Seo Sanghyeon
llvm-svn: 44455
2007-11-30 18:02:19 +00:00
Chris Lattner
b6a7b582ee
Fix a codegen crash on void ?: reported by Oliver
...
llvm-svn: 44454
2007-11-30 17:56:23 +00:00
Chris Lattner
aa0b570dfb
Support fully general case expressions, patch by Sanghyeon Seo!
...
llvm-svn: 44453
2007-11-30 17:44:57 +00:00
Christopher Lamb
0112f62bb9
Doh! Check in this long overdue test fix.
...
llvm-svn: 44450
2007-11-30 06:35:48 +00:00
Anders Carlsson
e1af1d20ef
Support lax vector conversions.
...
llvm-svn: 44449
2007-11-30 04:21:22 +00:00
Ted Kremenek
22a0d616f6
Added "complex.c" (a copy of test/Codegen/complex.) to the serialization
...
test suite.
llvm-svn: 44439
2007-11-29 19:05:51 +00:00
Christopher Lamb
42e69f219d
Support floating point literals of the form "1e-16f" which specify an exponent but no decimal point.
...
llvm-svn: 44431
2007-11-29 06:06:27 +00:00
Ted Kremenek
2501c8294f
Fixed test case to not expect a warning when one should not be emitted.
...
Removed redundant test case.
llvm-svn: 44426
2007-11-29 01:03:21 +00:00
Ted Kremenek
0865d8a5d0
Added test cases for -Wfloat-equal to test comparisons against literals that can be
...
represented exactly and inexactly by APFloats. For the former, we do not emit a
warning.
llvm-svn: 44425
2007-11-29 01:00:11 +00:00
Ted Kremenek
5d169cf285
Inlined test case to make it independent of the stmt_exprs test case in test/Sema.
...
llvm-svn: 44416
2007-11-28 21:29:54 +00:00
Ted Kremenek
31540ed8fe
Added the "Serialization" test directory to the set of tests executed.
...
Introduced a few line breaks to make the Makefile easier to read.
llvm-svn: 44413
2007-11-28 19:24:15 +00:00
Ted Kremenek
46cfdb9625
Added initial test case for testing serialization of ASTs. This test
...
case simply performs --test-pickling on the code found in Sema/stmt_exprs.c.
llvm-svn: 44412
2007-11-28 19:23:15 +00:00
Ted Kremenek
44d5166cdb
Changed TestRunner.sh to dump the output and generated script files in
...
subdirectories mirroring where the test case file is located
For example, for the test case "Sema/stmt_exprs.c", instead of the files
"Output/stmt_exprs.c.out" and "Output/stmt_exprs.c.out.script" being created, the
files "Output/Sema/stmt_exprs.c.out" and "Output/Sema/stmt_exprs.c.out.script" are
created. This prevents any collisions from different test directories that have the
same file name for a test case, and also makes it clear where the test case was
drawn from.
llvm-svn: 44410
2007-11-28 19:16:54 +00:00
Ted Kremenek
ab18e6d7fd
Added missing "RUN:" to comment for test case file. This fixed a bug where the test
...
case testing the frontend's support of statement expressions was not being
executed.
llvm-svn: 44409
2007-11-28 19:05:11 +00:00
Chris Lattner
db2a6ef881
Fix a bug checking for 'int foo(void)' that didn't look through typedefs of void.
...
Bug pointed out by Michael Zolda, thanks!
llvm-svn: 44408
2007-11-28 18:51:29 +00:00
Oliver Hunt
93c4ce650c
Fix typo in writable string test
...
llvm-svn: 44398
2007-11-28 06:52:03 +00:00
Oliver Hunt
a951571941
Adding code gen tests for writable and shared string literals.
...
llvm-svn: 44397
2007-11-28 06:27:12 +00:00
Anders Carlsson
299f2fc648
Add more intrinsics. We can now correctly parse both Carbon.h and Cocoa.h without having to do -arch ppc.
...
llvm-svn: 44392
2007-11-28 05:19:59 +00:00
Chris Lattner
da22eeca44
add several cases that Expr::hasStaticStorage missed, pointed out by Oliver Hunt
...
llvm-svn: 44376
2007-11-27 21:35:27 +00:00
Steve Naroff
0ee0b0ab8c
Move the null pointer constant check from Sema::CheckSingleInitializer/ActOnCallExpr/CheckMessageArgumentTypes/ActOnReturnStmt to Sema::CheckSingleAssignmentConstraints. This makes sure all null pointer assignments are considered compatible.
...
Thanks to Seo Sanghyeon for the bug, follow-through, and patch!
llvm-svn: 44366
2007-11-27 17:58:44 +00:00
Anders Carlsson
de71adff60
Report errors for invalid casts from/to vectors.
...
llvm-svn: 44350
2007-11-27 05:51:55 +00:00
Ted Kremenek
6eefb85ef5
Fixed #include of objc/objc.h so that it works on case-sensitive filesystems.
...
llvm-svn: 44337
2007-11-26 22:49:09 +00:00
Fariborz Jahanian
a883d6ed89
Patch to fix a regression caused by recent rewrite changes.
...
A potential API bug in ReplaceText pending (A FIXME is added).
llvm-svn: 44333
2007-11-26 19:52:57 +00:00
Bill Wendling
8da1db4f34
The checking for the delimiters of expected error/warning messages was
...
looking only for { and } instead of {{ and }}. Changed it to check for
this explicitly.
llvm-svn: 44326
2007-11-26 08:26:20 +00:00
Chris Lattner
2ab40a6207
Fix sema support for the gnu ?: expression with a
...
missing middle expression, and fix a codegen bug where
we didn't correctly promote the condition to the right
result type. This fixes PR1824.
llvm-svn: 44322
2007-11-26 01:40:58 +00:00
Chris Lattner
a3ee6fa84f
this works.
...
llvm-svn: 44321
2007-11-26 01:39:17 +00:00
Anders Carlsson
290aa8560b
Check that the clobber registers are valid.
...
llvm-svn: 44311
2007-11-25 00:25:21 +00:00
Ted Kremenek
0d20033c6a
Added more test cases for uninitialized values checker.
...
llvm-svn: 44307
2007-11-24 23:06:58 +00:00
Ted Kremenek
2e04d73d83
Fixed bogus culling of uninitialized-values "taint" propagation during assignments.
...
We accidentally were throttling the propagation of uninitialized state across
assignments (e.g. x = y). Thanks to Anders Carlsson for spotting this problem.
Added test cases to test suite to provide regression testing for the
uninitialized values analysis.
llvm-svn: 44306
2007-11-24 20:07:36 +00:00
Ted Kremenek
33407b3338
Moved dead-stores test cast to a new test suite subdirectory: Analysis.
...
llvm-svn: 44305
2007-11-24 19:49:35 +00:00
Chris Lattner
136449a6d7
improve codegen for global variable initializers, implementing
...
test/CodeGen/global-with-initialiser.c
Patch by Oliver Hunt!
llvm-svn: 44290
2007-11-23 22:07:55 +00:00
Anders Carlsson
80a5ea3552
Check asm input and output expressions.
...
llvm-svn: 44289
2007-11-23 19:43:50 +00:00
Chris Lattner
9fcdc52243
Fix PR1820, an incredibly subtle macro expansion bug that Neil discovered.
...
Neil, please review this fix.
llvm-svn: 44285
2007-11-23 06:50:21 +00:00
Anders Carlsson
091a059c55
GCC fails if there is a trailing colon but no clobbers.
...
llvm-svn: 44265
2007-11-21 23:27:34 +00:00
Chris Lattner
5c3f1541a7
Improve function decl merging, patch by Oliver Hunt!
...
llvm-svn: 44253
2007-11-20 19:04:50 +00:00
Ted Kremenek
9e823c745d
Added another test case for the Dead Stores checker that tests that
...
block-level expressions are evaluated the same as regular expressions. Test
case provided by Nuno Lopes.
llvm-svn: 44247
2007-11-20 03:03:00 +00:00
Ted Kremenek
eb8471bfa1
Added test case for dead stores checker (live variables analysis) that tests
...
for correct propagation/update of liveness information within subexpressions
of Block-Level expressions. Test case provided by Nuno Lopes.
llvm-svn: 44225
2007-11-19 06:38:23 +00:00
Anders Carlsson
9c1011c090
Put back the flags field in the constant CF string type.
...
llvm-svn: 44222
2007-11-19 00:25:30 +00:00
Ted Kremenek
094079c0dc
Added test case for dead-stores checker. Test case provided by Nuno Lopes.
...
llvm-svn: 44221
2007-11-18 20:06:35 +00:00
Chris Lattner
48d52848d7
Tighten up address-of checking, implementing test/Sema/expr-address-of.c.
...
This fixes a bug reported by Seo Sanghyeon.
This was meant to be committed yesterday, but the commit failed. doh.
llvm-svn: 44190
2007-11-16 17:46:48 +00:00
Chris Lattner
609d413363
fix a bug Steve noticed, where a #import of the main file itself would fail.
...
llvm-svn: 44178
2007-11-15 19:07:47 +00:00
Chris Lattner
e6c7a858b0
Fix a bug handling hex floats in c90 mode, pointed out by Neil.
...
llvm-svn: 44120
2007-11-14 16:14:50 +00:00
Chris Lattner
07b201d9c0
implement test/Sema/typedef-prototype.c, allowing code
...
to declare a function with a typedef:
typedef int unary_int_func(int arg);
unary_int_func add_one;
This patch contributed by Seo Sanghyeon!
llvm-svn: 44100
2007-11-14 06:34:38 +00:00
Fariborz Jahanian
bc92fd7542
Type encoding for structs.
...
llvm-svn: 44087
2007-11-13 23:21:38 +00:00
Fariborz Jahanian
989e03989b
Fixed a rewrite of metadata bug when category implementation has no matching interface.
...
llvm-svn: 44072
2007-11-13 22:09:49 +00:00
Chris Lattner
47791a4051
Parse "sizeof(arr)[0]" as a sizeof of an expr if arr
...
is an expression.
llvm-svn: 44065
2007-11-13 20:50:37 +00:00
Ted Kremenek
794d8a6cde
Updated test case to flag about comparisons against constants. We may
...
invert this case (i.e., not flag a warning) in the future.
llvm-svn: 44059
2007-11-13 19:18:22 +00:00
Ted Kremenek
b83f182b59
Modified -Wfloat-equal logic to suppress warnings where floating point values
...
are compared against builtins such as __builtin_inf.
llvm-svn: 44058
2007-11-13 19:17:00 +00:00