Commit Graph

14265 Commits

Author SHA1 Message Date
Steve Naroff 4eed7a16d6 Fix 5 issues from Chris's feedback on http://llvm.org/viewvc/llvm-project?view=rev&revision=75314.
Still more to come...just wanted to get the no-brainers out of the way.

llvm-svn: 75477
2009-07-13 17:19:15 +00:00
Devang Patel 9c3a0188cd Update debug info type cache after fwd decl is replaced by real decl.
llvm-svn: 75473
2009-07-13 17:03:14 +00:00
Devang Patel 290b052d43 Fix comment.
llvm-svn: 75471
2009-07-13 16:15:54 +00:00
Owen Anderson ae86c19e68 Update for LLVM API change.
llvm-svn: 75446
2009-07-13 04:10:07 +00:00
Chris Lattner e7cabb94a3 minor cleanups, reduce nesting of if's with early return.
llvm-svn: 75442
2009-07-13 00:10:46 +00:00
Daniel Dunbar 2e5be09280 Match declaration to definition.
llvm-svn: 75441
2009-07-12 23:52:11 +00:00
Daniel Dunbar 593c36c1c8 Match declaration to definition.
llvm-svn: 75439
2009-07-12 22:53:49 +00:00
Chris Lattner c9f6c334f0 fix file headers.
llvm-svn: 75437
2009-07-12 22:33:12 +00:00
Chris Lattner 000628da61 fix typo in file headers.
llvm-svn: 75436
2009-07-12 22:31:02 +00:00
Chris Lattner c638161d38 improve comments.
llvm-svn: 75435
2009-07-12 22:29:59 +00:00
Chris Lattner 7bad9ef8ae document the diagnostics pragmas, patch by Louis Gerbarg!
llvm-svn: 75432
2009-07-12 21:22:10 +00:00
Chris Lattner fb42a1820f add push/pop semantics for diagnostics. Patch by Louis Gerbarg!
llvm-svn: 75431
2009-07-12 21:18:45 +00:00
Daniel Dunbar d37908f149 Revert to using shell to find files instead of 'find', that wasn't portable.
- I think I did this commit sequence before. :)

llvm-svn: 75420
2009-07-12 19:00:20 +00:00
Daniel Dunbar 0f4736424e Stop looking for tests in the Output/ directory.
llvm-svn: 75404
2009-07-11 23:43:59 +00:00
Daniel Dunbar 619bf84ad4 The -disable-free hack didn't work...
llvm-svn: 75401
2009-07-11 23:05:12 +00:00
Daniel Dunbar 024c68b734 Force NeXT runtime for this test.
llvm-svn: 75400
2009-07-11 23:04:43 +00:00
Daniel Dunbar df1cff7356 Remove excessive use of Carbon.h / Cocoa.h in clang tests.
- These kinds of "shotgun" tests are very slow, and do not belong in the
   regression suite. If these kinds of tests are regarded to have value, they
   should be added to the LLVM test-suite.

 - I would actually like to remove all of these tests, but I left Sema/carbon.c
   and SemaObjC/cocoa.m...

llvm-svn: 75399
2009-07-11 23:03:07 +00:00
Daniel Dunbar 5ae1e029f4 Add --time-tests option to test runner, for profiling 'make test'.
llvm-svn: 75396
2009-07-11 22:46:27 +00:00
Daniel Dunbar 09bb21f80c Fix comment, and reduce computational expense of this test.
- I don't see any need for it to be this expensive.

llvm-svn: 75395
2009-07-11 22:44:48 +00:00
Daniel Dunbar cfd6800c76 Add -disable-free to this test in the hopes if having it pass on Linux for now.
llvm-svn: 75390
2009-07-11 22:00:53 +00:00
Daniel Dunbar 7e5f052772 Fix type conversion of ObjCObjectPointerType.
- Previous code was based on a misunderstanding (on my part) of the type
   representation.

llvm-svn: 75385
2009-07-11 21:12:14 +00:00
Daniel Dunbar 9d82da40ec Generate correct prototype for objc_enumerationMutation.
- This was a latent bug exposed by the recent objc type changes.

llvm-svn: 75383
2009-07-11 20:32:50 +00:00
Daniel Dunbar 631a57e30f Fix test case to match intent.
llvm-svn: 75381
2009-07-11 20:17:35 +00:00
Nuno Lopes 14ea24e422 restore proper valgrind support.
disclaim: I know nothing about Python, so apologies in advance if I break something

llvm-svn: 75368
2009-07-11 18:34:43 +00:00
Alisdair Meredith f6eb60a851 Fix breakage on Windows, cannot redeclare loop variable i in the immediate scope of loop. Rename variable to j.
llvm-svn: 75365
2009-07-11 14:32:10 +00:00
Ted Kremenek da03e8443e Handle insidious corner case exposed by RegionStoreManager when handling void* values that are bound
to symbolic regions and then treated like integers.

llvm-svn: 75356
2009-07-11 04:38:49 +00:00
Zhongxing Xu e00c981feb remove duplicated test cast.
llvm-svn: 75329
2009-07-11 02:33:35 +00:00
Anders Carlsson 0d14291fbf Fix a test.
llvm-svn: 75327
2009-07-11 01:00:52 +00:00
Ted Kremenek f6f0461a38 Restructure RegionStoreManager::EvalBinOp() as a switch dispatch over different
MemRegion kinds. This allows the compiler to identify what MemRegions we don't
handle for pointer arithmetic.

llvm-svn: 75326
2009-07-11 00:58:27 +00:00
Eli Friedman 55179ca5aa Fix typo (found by gcc warning).
llvm-svn: 75325
2009-07-11 00:57:02 +00:00
Anders Carlsson 43171d6aeb Add another test.
llvm-svn: 75324
2009-07-11 00:55:33 +00:00
Anders Carlsson ae01993a12 Implement more of C++0x 'auto'. A variable with an auto type specifier must have an initializer. Also, move some tests around to match the C++0x draft better.
llvm-svn: 75322
2009-07-11 00:34:39 +00:00
Ted Kremenek f514592197 Fix warning when compiling with optimizations:
warning: ‘OPT’ may be used uninitialized in this function

Now OPT is initialized to NULL. I'm not certain if this is the correct fix;
others please review.

llvm-svn: 75321
2009-07-11 00:21:48 +00:00
Ted Kremenek 156700fd14 This test passes with RegionStoreManager.
llvm-svn: 75318
2009-07-11 00:07:06 +00:00
Ted Kremenek 74a7b9188a This test now passes with RegionStoreManager.
llvm-svn: 75316
2009-07-11 00:03:23 +00:00
Anders Carlsson 9890fb5bf6 Remove some unused code from an experiment that I didn't like.
llvm-svn: 75315
2009-07-10 23:48:10 +00:00
Steve Naroff 7cae42b07a This patch includes a conceptually simple, but very intrusive/pervasive change.
The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches.

This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic.

By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. 

Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks.

llvm-svn: 75314
2009-07-10 23:34:53 +00:00
Ted Kremenek 94575aacc1 Restructure RegionStoreManager::getSizeInElements() to use a switch statement
over the types of MemRegions. This allows the compiler to warn us which regions
are not handled, and also is a little faster.

llvm-svn: 75304
2009-07-10 22:30:06 +00:00
Eli Friedman fd9b1094b8 Fix silly mistake I made applying patch to fix test.
llvm-svn: 75303
2009-07-10 22:27:56 +00:00
Ted Kremenek e057d4e5a9 Rename test file.
llvm-svn: 75297
2009-07-10 21:48:43 +00:00
Ted Kremenek 3fcf628b40 RegionStoreManager also passes this test file.
llvm-svn: 75296
2009-07-10 21:48:10 +00:00
Ted Kremenek 488495e491 RegionStoreManager now correctly passes this test file.
llvm-svn: 75295
2009-07-10 21:45:10 +00:00
Ted Kremenek 6cb2a34e3c Test case in test/Analysis/xfail_regionstore_wine_crash.c no longer fails, so
move this case to 'test/Analysis/misc-ps.m' to test with both BasicStoreManager
and RegionStoreManager.

llvm-svn: 75294
2009-07-10 21:43:30 +00:00
Anders Carlsson 7ca3f6feea Fix type of 'this' and add a decltype test.
llvm-svn: 75291
2009-07-10 21:35:09 +00:00
Ted Kremenek bf73ad47a8 Revert r75281 and simply remove the assertion in NewCastRegion that
CodeTextRegions can only be casted to FunctionPointer or BlockPointerTypes. This
simply isn't true. We can handle bogus operations on CodeTextRegions (e.g, an
array access) elsewhere.

llvm-svn: 75285
2009-07-10 21:24:45 +00:00
Ted Kremenek 6c94771a0b Fix crash in StoreManager::NewCastRegion regarding handling casts to void*,
void**, void***, etc.  Such casts should just pass the region through.

llvm-svn: 75281
2009-07-10 21:11:16 +00:00
Eli Friedman 837f574ee9 Use /usr/bin/env trick to find python. Patch by Krister Walfridsson.
llvm-svn: 75271
2009-07-10 20:15:12 +00:00
Fariborz Jahanian 3554b5a37c Patch to build list of inherited virtual base classes
in their order of construction for each class and use it 
to to check on propery order of base class construction 
under -Wreorder option.

llvm-svn: 75270
2009-07-10 20:13:23 +00:00
Eli Friedman 7d369cd2a6 Misc fixes to fix tests on OpenBSD, per email to cfe-commits. Patches
by Jonathan Gray and Krister Walfridsson.

llvm-svn: 75268
2009-07-10 20:10:06 +00:00
Anders Carlsson ea1cfb415b Fix a problem that Eli noticed, and that Doug helped me fix.
llvm-svn: 75265
2009-07-10 19:20:26 +00:00