summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Tentative declarations are supposed to have common linkage, not weak. Eli Friedman2008-05-291-1/+1
| | | | | | This change makes clang generate the same thing as llvm-gcc. llvm-svn: 51674
* Always use packed structs. This isn't really very nice, but there's Eli Friedman2008-05-292-12/+13
| | | | | | | | | | | | | nothing fundamentally wrong with it. Emitting unpacked structs where possible is more work for almost no practical benefit. We'll probably want to fix it at some point anyway, but it's low priority. The issue with long double in particular is that LLVM thinks an X86 long double is 10 bytes, while clang considers it for all purposes to be either 12 or 16 bytes, depending on the platform, even in a packed struct. llvm-svn: 51673
* Fix a couple crashes on invalid input.Chris Lattner2008-05-271-0/+5
| | | | llvm-svn: 51622
* Check first member alignment and uses packed struct if required.Devang Patel2008-05-271-0/+3
| | | | llvm-svn: 51619
* Fix test caseDevang Patel2008-05-271-0/+1
| | | | llvm-svn: 51618
* A few more cases for aggregate values.Eli Friedman2008-05-271-0/+14
| | | | llvm-svn: 51596
* Implementation of __builtin_ctlz.Eli Friedman2008-05-271-0/+4
| | | | llvm-svn: 51595
* Get the type right for wide string literals; it's wchar_t, not char.Eli Friedman2008-05-271-0/+3
| | | | llvm-svn: 51586
* Don't swap function decls, and add them to the scope as they are Eli Friedman2008-05-271-0/+12
| | | | | | | | | | | | | encountered. Mixing up the decls is unintuitive, and confuses the AST destruction code. Fixes PR2360. Note that there is a need to look up the characteristics and declarations of a function associated with a particular name or decl, but the original swapping code doesn't solve it properly. http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-May/001644.html is one suggestion for how to fix that. llvm-svn: 51584
* Add a more reliable check for whether a static declaration has already Eli Friedman2008-05-271-0/+5
| | | | | | | been used. In preparation for the fix to PR2360, but also a minor bug in its own right. llvm-svn: 51583
* Generalize the float type generation code, and specifically fix the Eli Friedman2008-05-271-0/+4
| | | | | | codegen of X86 long double. llvm-svn: 51578
* Implementation of gcc mode attribute; this is significant because Eli Friedman2008-05-271-0/+15
| | | | | | | | | | it fixes PR2204. Not too much to say about the implementation; it works in a similar way to the vector size attribute. At some point, we need to modify the targets to provide information about the appropriate types. llvm-svn: 51577
* Change diagnostic per suggestion, to make it a bit clearer what is Eli Friedman2008-05-273-4/+4
| | | | | | happening. llvm-svn: 51574
* Count the number of initializable members correctly in structs/unions Eli Friedman2008-05-251-0/+6
| | | | | | with unnamed members. llvm-svn: 51557
* Diagnose implicit init list for empty aggregate, like struct {}. Fixes Eli Friedman2008-05-251-0/+4
| | | | | | PR2151 (by not creating the empty implicit init list). llvm-svn: 51556
* Move the error checking for variable-sized objects so we don't Eli Friedman2008-05-251-0/+4
| | | | | | double-report errors; fixes PR2362. llvm-svn: 51555
* Fix this test on non-X86 platforms.Eli Friedman2008-05-251-1/+2
| | | | llvm-svn: 51552
* fix a nasty off-by-one error.Chris Lattner2008-05-231-0/+14
| | | | llvm-svn: 51519
* fix an inconsistency computing offsets that caused a crash on rewrite-nest.mChris Lattner2008-05-231-0/+29
| | | | llvm-svn: 51514
* More test cases for retain/release checker. These cases handle not flagging ↵Ted Kremenek2008-05-231-0/+38
| | | | | | leaks for static variables. llvm-svn: 51486
* fix typoGabor Greif2008-05-231-3/+3
| | | | llvm-svn: 51479
* Additional retain/release checker regression tests.Ted Kremenek2008-05-221-0/+17
| | | | llvm-svn: 51454
* Patch for PR2350; the issue was tnat we were allowing (with an error) Eli Friedman2008-05-221-7/+8
| | | | | | void f(const void) in one place and rejecting it in another. llvm-svn: 51424
* Improve dead stores diagnostics to include the variable name.Ted Kremenek2008-05-211-5/+5
| | | | llvm-svn: 51395
* Fixed bug in the transfer function for dereferences: the loaded value from ↵Ted Kremenek2008-05-211-0/+8
| | | | | | | | | | EvalLoad should bind to the UnaryOperator*, not its subexpression. Added test case to exercise this fix when checking for uses of uninitialized values. Patch by Zhongxing Xu! llvm-svn: 51377
* A small testcase; no patch, since it was a bug in a patch I never Eli Friedman2008-05-211-0/+5
| | | | | | committed. llvm-svn: 51370
* Fix this test so that it's valid; the point is to test for the crash, Eli Friedman2008-05-211-1/+1
| | | | | | not the missing diagnostic. llvm-svn: 51365
* PR2347: Fix crash iterating over VLAs; this started triggering because Eli Friedman2008-05-211-0/+8
| | | | | | we now iterate over the whole AST when we destroy it. llvm-svn: 51363
* Fix a couple of bugs found by Neil Booth in the const-ness checking.Eli Friedman2008-05-211-0/+12
| | | | llvm-svn: 51361
* Test from PR2332; bug already fixed by r51311.Eli Friedman2008-05-201-0/+2
| | | | llvm-svn: 51316
* Fix the scope of K&R-style argument declarations so that they don't Eli Friedman2008-05-201-0/+5
| | | | | | | | | extend beyond the end of the function. I'm not completely sure this is the right way to fix this bug, so someone familiar with the parser should double-check. llvm-svn: 51311
* Fix test (it was incorrectly succeeding).Eli Friedman2008-05-201-9/+2
| | | | llvm-svn: 51310
* Add codegen support for stack address intrinsics.Eli Friedman2008-05-201-0/+16
| | | | llvm-svn: 51309
* Fix typo in test.Eli Friedman2008-05-201-2/+2
| | | | llvm-svn: 51308
* Add __builtin_frame_address and __builtin_return_address gcc builtins to Eli Friedman2008-05-201-0/+16
| | | | | | Sema. No codegen yet. llvm-svn: 51307
* Implement codegen for comma operator for structs.Eli Friedman2008-05-201-0/+4
| | | | llvm-svn: 51304
* Be a bit more defensive in SemaInit.Eli Friedman2008-05-201-0/+1
| | | | llvm-svn: 51301
* Add some more checking for compound literals.Eli Friedman2008-05-201-1/+5
| | | | llvm-svn: 51300
* Implement CodeGen for __builtin_memcpy.Eli Friedman2008-05-191-0/+3
| | | | llvm-svn: 51282
* Make the unused expression warning a bit less aggressive (found in PHP Eli Friedman2008-05-191-0/+5
| | | | | | code). llvm-svn: 51276
* Switch on SemaInit; this makes some code in SemaDecl dead, but I'll give Eli Friedman2008-05-191-2/+2
| | | | | | it a few days to make sure there aren't any significant regressions. llvm-svn: 51273
* Remove illegal test.Eli Friedman2008-05-191-1/+0
| | | | llvm-svn: 51267
* Fix the emission of expressions like char a[10] = "asdf"; previously, Eli Friedman2008-05-191-0/+8
| | | | | | | | they were causing bad code to be emitted. There are two fixes here: one makes sure we emit a string that is long enough, and one makes sure we properly handle string initialization in init lists. llvm-svn: 51259
* Add proper type-checking for pointer additiion; before, we were acceptingEli Friedman2008-05-181-0/+14
| | | | | | addition with a pointer and an integer even when it didn't make sense. llvm-svn: 51228
* Fix support for _Bool bitfields. The issue is that the bitfield width Eli Friedman2008-05-171-0/+54
| | | | | | | | | | | | used for _Bool is not the same as the primitive width (which for _Bool is 1 bit). The load and store changes add some casts to make the types consistent. The EmitLValue changes make sure that the pointer is of an appropriate type for loading the bitfield. This isn't perfect, but it's an improvement, and getting everything right depends on actually laying out structs in an ABI-compliant way. llvm-svn: 51224
* Patch for PR2334, and a similar ObjC bug.Eli Friedman2008-05-161-0/+5
| | | | llvm-svn: 51193
* Implementation of __builtin_shufflevector, a portable builtin capable of Eli Friedman2008-05-141-0/+5
| | | | | | | | | expressing the full flexibility of the LLVM shufflevector instruction. The expected immediate usage is in *mmintrin.h, so that they don't depend on the mess of gcc-inherited (and not completely implemented) shuffle builtins. llvm-svn: 51113
* Add codegen support for block-level compound literals.Eli Friedman2008-05-131-0/+13
| | | | llvm-svn: 51081
* Both operands to && have to be scalars, not just one.Eli Friedman2008-05-131-0/+3
| | | | llvm-svn: 51065
* Fix <rdar://problem/5924576> clang -fsyntax-only generates "redefinition" ↵Steve Naroff2008-05-121-0/+3
| | | | | | | | errors when parsing AppKit that gcc does not. Teach Sema::MergeVarDecl() about __private_extern__. llvm-svn: 51005
OpenPOWER on IntegriCloud