]> granicus.if.org Git - clang/log
clang
16 years agoInstead of recovering from a wrong invalidation, this patch aims to
Zhongxing Xu [Tue, 14 Jul 2009 01:12:46 +0000 (01:12 +0000)]
Instead of recovering from a wrong invalidation, this patch aims to
invalidate the region correctly. It uses the cast-to type to invalidate
the region when available. To avoid invalid cast-to type like 'void*' or 'id',
region store now only records non-generic casts of regions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75580 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoI just revertd llvm patch.
Devang Patel [Tue, 14 Jul 2009 00:56:16 +0000 (00:56 +0000)]
I just revertd llvm patch.
XFAIL this for now until I prepare clang specific patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75575 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd basic checking for passing NULL to CFRetain/CFRelease, since those functions
Ted Kremenek [Tue, 14 Jul 2009 00:43:42 +0000 (00:43 +0000)]
Add basic checking for passing NULL to CFRetain/CFRelease, since those functions
are not explicitly marked as not accepting NULL pointers. This check illustrates
how we need more refactoring in the custom-check logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75570 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate for API change.
Owen Anderson [Tue, 14 Jul 2009 00:38:16 +0000 (00:38 +0000)]
Update for API change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75569 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTidy pretty-printing for SVals, using 'dump()' instead of 'printStdErr()', and implem...
Ted Kremenek [Mon, 13 Jul 2009 23:53:06 +0000 (23:53 +0000)]
Tidy pretty-printing for SVals, using 'dump()' instead of 'printStdErr()', and implementing operator<< support for llvm::raw_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75560 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoWhen pretty-printing symbolic regions, use '{' ... '}' to indicate the symbol used...
Ted Kremenek [Mon, 13 Jul 2009 23:38:57 +0000 (23:38 +0000)]
When pretty-printing symbolic regions, use '{' ... '}' to indicate the symbol used for the region (makes it easier to read for nested regions).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75550 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFixes a minor bug in pretty printing of ctor defs.
Fariborz Jahanian [Mon, 13 Jul 2009 23:31:10 +0000 (23:31 +0000)]
Fixes a minor bug in pretty printing of ctor defs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75549 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoChange pretty-printing API for SymExprs and MemRegions to use a naming convention...
Ted Kremenek [Mon, 13 Jul 2009 23:31:04 +0000 (23:31 +0000)]
Change pretty-printing API for SymExprs and MemRegions to use a naming convention and style similar to other elements in Clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75548 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEnhance SimpleSValuator::EvalBinOpNN to recognize the trivial case
Ted Kremenek [Mon, 13 Jul 2009 21:55:12 +0000 (21:55 +0000)]
Enhance SimpleSValuator::EvalBinOpNN to recognize the trivial case
where we are comparing a symbolic value against itself, regardless of
the nature of that symbolic value.

This enhancement identified a case where RegionStoreManager is not
correctly symbolicating the values of the pointees of parameters.  The
failing test is now in 'test/Analysis/misc-ps-region-store.m', with
that test file now (temporarily) marked XFAIL.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75521 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoExplicitly initialize the options array, MinGW's gcc 4.3.5 appears to have a bug
Daniel Dunbar [Mon, 13 Jul 2009 21:50:47 +0000 (21:50 +0000)]
Explicitly initialize the options array, MinGW's gcc 4.3.5 appears to have a bug
in array value-initialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75518 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThere is no need to value initialize this array.
Daniel Dunbar [Mon, 13 Jul 2009 21:48:50 +0000 (21:48 +0000)]
There is no need to value initialize this array.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75517 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove superfluous call to getAsPointerType()...
Steve Naroff [Mon, 13 Jul 2009 21:32:29 +0000 (21:32 +0000)]
Remove superfluous call to getAsPointerType()...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75509 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake stdin for test scripts empty, so that tests don't accidentally hang waiting
Daniel Dunbar [Mon, 13 Jul 2009 21:24:28 +0000 (21:24 +0000)]
Make stdin for test scripts empty, so that tests don't accidentally hang waiting
for stdin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75506 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSema::CheckAdditionOperands(): Use Type::getPointeeType() and remove PTy and OPT...
Steve Naroff [Mon, 13 Jul 2009 21:20:41 +0000 (21:20 +0000)]
Sema::CheckAdditionOperands(): Use Type::getPointeeType() and remove PTy and OPT variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75505 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNew testcase for rev 75503.
Devang Patel [Mon, 13 Jul 2009 21:20:20 +0000 (21:20 +0000)]
New testcase for rev 75503.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75504 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd netbsd support, patch by Krister Kalfridsson!
Chris Lattner [Mon, 13 Jul 2009 20:29:08 +0000 (20:29 +0000)]
add netbsd support, patch by Krister Kalfridsson!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75492 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded pretty-printing support for constructor definition.
Fariborz Jahanian [Mon, 13 Jul 2009 20:18:13 +0000 (20:18 +0000)]
Added pretty-printing support for constructor definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75487 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago- Improve comment for Type::getPointeeType().
Steve Naroff [Mon, 13 Jul 2009 19:06:52 +0000 (19:06 +0000)]
- Improve comment for Type::getPointeeType().
- Remove a couple redundant casts/returns.
- Fix 80 column violations for all getAsStringInternal() methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75485 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix 5 issues from Chris's feedback on http://llvm.org/viewvc/llvm-project?view=rev...
Steve Naroff [Mon, 13 Jul 2009 17:19:15 +0000 (17:19 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75477 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate debug info type cache after fwd decl is replaced by real decl.
Devang Patel [Mon, 13 Jul 2009 17:03:14 +0000 (17:03 +0000)]
Update debug info type cache after fwd decl is replaced by real decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75473 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix comment.
Devang Patel [Mon, 13 Jul 2009 16:15:54 +0000 (16:15 +0000)]
Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75471 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate for LLVM API change.
Owen Anderson [Mon, 13 Jul 2009 04:10:07 +0000 (04:10 +0000)]
Update for LLVM API change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75446 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agominor cleanups, reduce nesting of if's with early return.
Chris Lattner [Mon, 13 Jul 2009 00:10:46 +0000 (00:10 +0000)]
minor cleanups, reduce nesting of if's with early return.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75442 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMatch declaration to definition.
Daniel Dunbar [Sun, 12 Jul 2009 23:52:11 +0000 (23:52 +0000)]
Match declaration to definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75441 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMatch declaration to definition.
Daniel Dunbar [Sun, 12 Jul 2009 22:53:49 +0000 (22:53 +0000)]
Match declaration to definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75439 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix file headers.
Chris Lattner [Sun, 12 Jul 2009 22:33:12 +0000 (22:33 +0000)]
fix file headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75437 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix typo in file headers.
Chris Lattner [Sun, 12 Jul 2009 22:31:02 +0000 (22:31 +0000)]
fix typo in file headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75436 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoimprove comments.
Chris Lattner [Sun, 12 Jul 2009 22:29:59 +0000 (22:29 +0000)]
improve comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75435 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agodocument the diagnostics pragmas, patch by Louis Gerbarg!
Chris Lattner [Sun, 12 Jul 2009 21:22:10 +0000 (21:22 +0000)]
document the diagnostics pragmas, patch by Louis Gerbarg!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75432 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoadd push/pop semantics for diagnostics. Patch by Louis Gerbarg!
Chris Lattner [Sun, 12 Jul 2009 21:18:45 +0000 (21:18 +0000)]
add push/pop semantics for diagnostics.  Patch by Louis Gerbarg!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75431 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRevert to using shell to find files instead of 'find', that wasn't portable.
Daniel Dunbar [Sun, 12 Jul 2009 19:00:20 +0000 (19:00 +0000)]
Revert to using shell to find files instead of 'find', that wasn't portable.
 - I think I did this commit sequence before. :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75420 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoStop looking for tests in the Output/ directory.
Daniel Dunbar [Sat, 11 Jul 2009 23:43:59 +0000 (23:43 +0000)]
Stop looking for tests in the Output/ directory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75404 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThe -disable-free hack didn't work...
Daniel Dunbar [Sat, 11 Jul 2009 23:05:12 +0000 (23:05 +0000)]
The -disable-free hack didn't work...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75401 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoForce NeXT runtime for this test.
Daniel Dunbar [Sat, 11 Jul 2009 23:04:43 +0000 (23:04 +0000)]
Force NeXT runtime for this test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75400 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove excessive use of Carbon.h / Cocoa.h in clang tests.
Daniel Dunbar [Sat, 11 Jul 2009 23:03:07 +0000 (23:03 +0000)]
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...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75399 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd --time-tests option to test runner, for profiling 'make test'.
Daniel Dunbar [Sat, 11 Jul 2009 22:46:27 +0000 (22:46 +0000)]
Add --time-tests option to test runner, for profiling 'make test'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75396 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix comment, and reduce computational expense of this test.
Daniel Dunbar [Sat, 11 Jul 2009 22:44:48 +0000 (22:44 +0000)]
Fix comment, and reduce computational expense of this test.
 - I don't see any need for it to be this expensive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75395 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd -disable-free to this test in the hopes if having it pass on Linux for now.
Daniel Dunbar [Sat, 11 Jul 2009 22:00:53 +0000 (22:00 +0000)]
Add -disable-free to this test in the hopes if having it pass on Linux for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75390 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix type conversion of ObjCObjectPointerType.
Daniel Dunbar [Sat, 11 Jul 2009 21:12:14 +0000 (21:12 +0000)]
Fix type conversion of ObjCObjectPointerType.
 - Previous code was based on a misunderstanding (on my part) of the type
   representation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75385 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoGenerate correct prototype for objc_enumerationMutation.
Daniel Dunbar [Sat, 11 Jul 2009 20:32:50 +0000 (20:32 +0000)]
Generate correct prototype for objc_enumerationMutation.
 - This was a latent bug exposed by the recent objc type changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75383 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix test case to match intent.
Daniel Dunbar [Sat, 11 Jul 2009 20:17:35 +0000 (20:17 +0000)]
Fix test case to match intent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75381 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agorestore proper valgrind support.
Nuno Lopes [Sat, 11 Jul 2009 18:34:43 +0000 (18:34 +0000)]
restore proper valgrind support.
disclaim: I know nothing about Python, so apologies in advance if I break something

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75368 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix breakage on Windows, cannot redeclare loop variable i in the immediate scope...
Alisdair Meredith [Sat, 11 Jul 2009 14:32:10 +0000 (14:32 +0000)]
Fix breakage on Windows, cannot redeclare loop variable i in the immediate scope of loop.  Rename variable to j.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75365 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoHandle insidious corner case exposed by RegionStoreManager when handling void* values...
Ted Kremenek [Sat, 11 Jul 2009 04:38:49 +0000 (04:38 +0000)]
Handle insidious corner case exposed by RegionStoreManager when handling void* values that are bound
to symbolic regions and then treated like integers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75356 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoremove duplicated test cast.
Zhongxing Xu [Sat, 11 Jul 2009 02:33:35 +0000 (02:33 +0000)]
remove duplicated test cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75329 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a test.
Anders Carlsson [Sat, 11 Jul 2009 01:00:52 +0000 (01:00 +0000)]
Fix a test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75327 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRestructure RegionStoreManager::EvalBinOp() as a switch dispatch over different
Ted Kremenek [Sat, 11 Jul 2009 00:58:27 +0000 (00:58 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75326 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix typo (found by gcc warning).
Eli Friedman [Sat, 11 Jul 2009 00:57:02 +0000 (00:57 +0000)]
Fix typo (found by gcc warning).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75325 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd another test.
Anders Carlsson [Sat, 11 Jul 2009 00:55:33 +0000 (00:55 +0000)]
Add another test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75324 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement more of C++0x 'auto'. A variable with an auto type specifier must have...
Anders Carlsson [Sat, 11 Jul 2009 00:34:39 +0000 (00:34 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75322 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix warning when compiling with optimizations:
Ted Kremenek [Sat, 11 Jul 2009 00:21:48 +0000 (00:21 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75321 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThis test passes with RegionStoreManager.
Ted Kremenek [Sat, 11 Jul 2009 00:07:06 +0000 (00:07 +0000)]
This test passes with RegionStoreManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75318 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThis test now passes with RegionStoreManager.
Ted Kremenek [Sat, 11 Jul 2009 00:03:23 +0000 (00:03 +0000)]
This test now passes with RegionStoreManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75316 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove some unused code from an experiment that I didn't like.
Anders Carlsson [Fri, 10 Jul 2009 23:48:10 +0000 (23:48 +0000)]
Remove some unused code from an experiment that I didn't like.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75315 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThis patch includes a conceptually simple, but very intrusive/pervasive change.
Steve Naroff [Fri, 10 Jul 2009 23:34:53 +0000 (23:34 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75314 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRestructure RegionStoreManager::getSizeInElements() to use a switch statement
Ted Kremenek [Fri, 10 Jul 2009 22:30:06 +0000 (22:30 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75304 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix silly mistake I made applying patch to fix test.
Eli Friedman [Fri, 10 Jul 2009 22:27:56 +0000 (22:27 +0000)]
Fix silly mistake I made applying patch to fix test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75303 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRename test file.
Ted Kremenek [Fri, 10 Jul 2009 21:48:43 +0000 (21:48 +0000)]
Rename test file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75297 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRegionStoreManager also passes this test file.
Ted Kremenek [Fri, 10 Jul 2009 21:48:10 +0000 (21:48 +0000)]
RegionStoreManager also passes this test file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75296 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRegionStoreManager now correctly passes this test file.
Ted Kremenek [Fri, 10 Jul 2009 21:45:10 +0000 (21:45 +0000)]
RegionStoreManager now correctly passes this test file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75295 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTest case in test/Analysis/xfail_regionstore_wine_crash.c no longer fails, so
Ted Kremenek [Fri, 10 Jul 2009 21:43:30 +0000 (21:43 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75294 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix type of 'this' and add a decltype test.
Anders Carlsson [Fri, 10 Jul 2009 21:35:09 +0000 (21:35 +0000)]
Fix type of 'this' and add a decltype test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75291 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRevert r75281 and simply remove the assertion in NewCastRegion that
Ted Kremenek [Fri, 10 Jul 2009 21:24:45 +0000 (21:24 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75285 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix crash in StoreManager::NewCastRegion regarding handling casts to void*,
Ted Kremenek [Fri, 10 Jul 2009 21:11:16 +0000 (21:11 +0000)]
Fix crash in StoreManager::NewCastRegion regarding handling casts to void*,
void**, void***, etc.  Such casts should just pass the region through.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75281 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse /usr/bin/env trick to find python. Patch by Krister Walfridsson.
Eli Friedman [Fri, 10 Jul 2009 20:15:12 +0000 (20:15 +0000)]
Use /usr/bin/env trick to find python.  Patch by Krister Walfridsson.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75271 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPatch to build list of inherited virtual base classes
Fariborz Jahanian [Fri, 10 Jul 2009 20:13:23 +0000 (20:13 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75270 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMisc fixes to fix tests on OpenBSD, per email to cfe-commits. Patches
Eli Friedman [Fri, 10 Jul 2009 20:10:06 +0000 (20:10 +0000)]
Misc fixes to fix tests on OpenBSD, per email to cfe-commits.  Patches
by Jonathan Gray and Krister Walfridsson.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75268 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a problem that Eli noticed, and that Doug helped me fix.
Anders Carlsson [Fri, 10 Jul 2009 19:20:26 +0000 (19:20 +0000)]
Fix a problem that Eli noticed, and that Doug helped me fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75265 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRename potentially ambiguous member template 'getRegion' to 'getSubRegion' to hopeful...
Ted Kremenek [Fri, 10 Jul 2009 16:51:45 +0000 (16:51 +0000)]
Rename potentially ambiguous member template 'getRegion' to 'getSubRegion' to hopefully resolve template lookup ambiguities on some compilers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75253 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agolinkify
Chris Lattner [Fri, 10 Jul 2009 05:07:59 +0000 (05:07 +0000)]
linkify

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75225 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd documentation for the Index library to clang's web page.
Argyrios Kyrtzidis [Fri, 10 Jul 2009 03:41:36 +0000 (03:41 +0000)]
Add documentation for the Index library to clang's web page.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75222 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSimplify a bit by using functions instead of checking enum values. No functionality...
Argyrios Kyrtzidis [Fri, 10 Jul 2009 03:41:26 +0000 (03:41 +0000)]
Simplify a bit by using functions instead of checking enum values. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75221 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSwitch BasicStoreManager to use the new CastRegion implementation by default,
Ted Kremenek [Fri, 10 Jul 2009 00:41:58 +0000 (00:41 +0000)]
Switch BasicStoreManager to use the new CastRegion implementation by default,
and replace the 'clang-cc' option '-analyzer-store=basic-new-cast' with
'-analyzer-store=basic-old-cast'. We'll keep the old CastRegion implementation
around for a little while for regression testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75209 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agodon't crash if class is using itself as its super class.
Fariborz Jahanian [Thu, 9 Jul 2009 22:08:26 +0000 (22:08 +0000)]
don't crash if class is using itself as its super class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75178 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix another decltype crash.
Anders Carlsson [Thu, 9 Jul 2009 22:00:53 +0000 (22:00 +0000)]
Fix another decltype crash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75175 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSema check on out of order object initialization of
Fariborz Jahanian [Thu, 9 Jul 2009 19:59:47 +0000 (19:59 +0000)]
Sema check on out of order object initialization of
class object's base and members under -Wreorder flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75168 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse getDeclName in DefineImplicitOverloadedAssign as well.
Anders Carlsson [Thu, 9 Jul 2009 17:47:25 +0000 (17:47 +0000)]
Use getDeclName in DefineImplicitOverloadedAssign as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75152 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAnother little test for C++ [over.over]
Douglas Gregor [Thu, 9 Jul 2009 17:44:05 +0000 (17:44 +0000)]
Another little test for C++ [over.over]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75151 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPass the DeclName to the diagnostic builder so that member names will be quoted corre...
Anders Carlsson [Thu, 9 Jul 2009 17:37:12 +0000 (17:37 +0000)]
Pass the DeclName to the diagnostic builder so that member names will be quoted correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75150 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate checker build.
Ted Kremenek [Thu, 9 Jul 2009 17:20:25 +0000 (17:20 +0000)]
Update checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75147 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd test for C++ [over.over.]p1, the contexts in which one can take the address of...
Douglas Gregor [Thu, 9 Jul 2009 17:16:51 +0000 (17:16 +0000)]
Add test for C++ [over.over.]p1, the contexts in which one can take the address of an overloaded function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75146 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove dead code.
Zhongxing Xu [Thu, 9 Jul 2009 09:17:11 +0000 (09:17 +0000)]
Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75127 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoStore the isAddressOfOperand in the UnresolvedDeclRefExpr, so that we can pass it...
Anders Carlsson [Thu, 9 Jul 2009 00:05:08 +0000 (00:05 +0000)]
Store the isAddressOfOperand in the UnresolvedDeclRefExpr, so that we can pass it when instantiating the expr. Fixes another member pointer bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75075 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement the simple form of overload resolution used when taking the
Douglas Gregor [Wed, 8 Jul 2009 23:33:52 +0000 (23:33 +0000)]
Implement the simple form of overload resolution used when taking the
address of an overloaded function (which may involve both functions
and function templates).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75069 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix: <rdar://problem/7034511> ValueManager::makeIntVal(uint64_t X, QualType T) should...
Ted Kremenek [Wed, 8 Jul 2009 22:42:46 +0000 (22:42 +0000)]
Fix: <rdar://problem/7034511> ValueManager::makeIntVal(uint64_t X, QualType T) should return a 'Loc' when 'T' is a pointer

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75062 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIt's not allowed to form member pointers to members that have reference type. Add...
Anders Carlsson [Wed, 8 Jul 2009 21:45:58 +0000 (21:45 +0000)]
It's not allowed to form member pointers to members that have reference type. Add a test for this and the rest of [dcl.mptr]p3.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75054 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoBump the PCH version number
Douglas Gregor [Wed, 8 Jul 2009 21:07:44 +0000 (21:07 +0000)]
Bump the PCH version number

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75049 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement template argument deduction when taking the address of a
Douglas Gregor [Wed, 8 Jul 2009 20:55:45 +0000 (20:55 +0000)]
Implement template argument deduction when taking the address of a
function template. Most of the change here is in factoring out the
common bits used for template argument deduction from a function call
and when taking the address of a function template.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75044 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate for IRBuilder API change.
Owen Anderson [Wed, 8 Jul 2009 20:52:20 +0000 (20:52 +0000)]
Update for IRBuilder API change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75041 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate for LLVM API change.
Owen Anderson [Wed, 8 Jul 2009 19:05:04 +0000 (19:05 +0000)]
Update for LLVM API change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75028 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement code generation of ChooseExpr for aggregate types.
Anders Carlsson [Wed, 8 Jul 2009 18:33:14 +0000 (18:33 +0000)]
Implement code generation of ChooseExpr for aggregate types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75021 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPatch adds test to my previous patch for assigning to
Fariborz Jahanian [Wed, 8 Jul 2009 16:37:44 +0000 (16:37 +0000)]
Patch adds test to my previous patch for assigning to
gc'able structs in the Next runtime and adds missing
PCH info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75014 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix PR4513, a build problem with VC++, patch by James Abbatiello!
Chris Lattner [Wed, 8 Jul 2009 16:24:37 +0000 (16:24 +0000)]
fix PR4513, a build problem with VC++, patch by James Abbatiello!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75013 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCorrect FreeBSD target info, fixing PR4514.
Duncan Sands [Wed, 8 Jul 2009 13:55:08 +0000 (13:55 +0000)]
Correct FreeBSD target info, fixing PR4514.
Patch by Roman Divacky.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75003 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a corner case with argument-dependent lookup and overloaded function sets.
Douglas Gregor [Wed, 8 Jul 2009 10:57:20 +0000 (10:57 +0000)]
Fix a corner case with argument-dependent lookup and overloaded function sets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74999 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate the C++ status table to better reflect our support for function overloading
Douglas Gregor [Wed, 8 Jul 2009 10:03:09 +0000 (10:03 +0000)]
Update the C++ status table to better reflect our support for function overloading

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74997 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImprove argument-dependent lookup to find associated classes and
Douglas Gregor [Wed, 8 Jul 2009 07:51:57 +0000 (07:51 +0000)]
Improve argument-dependent lookup to find associated classes and
namespaces based on the template arguments of a class template
specialization type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74993 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoInitialize the ConstantArraySizeAsWritten field of PrintingPolicy class.
Argyrios Kyrtzidis [Wed, 8 Jul 2009 02:17:42 +0000 (02:17 +0000)]
Initialize the ConstantArraySizeAsWritten field of PrintingPolicy class.

It contained garbage since the constructor didn't initialize it and caused test/Sema/array-constraint.c to randomly fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74989 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate for LLVM API change.
Owen Anderson [Wed, 8 Jul 2009 01:29:18 +0000 (01:29 +0000)]
Update for LLVM API change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74986 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplemented memmove_collectable API for Next runtime
Fariborz Jahanian [Wed, 8 Jul 2009 01:18:33 +0000 (01:18 +0000)]
Implemented memmove_collectable API for Next runtime
when struct variables with GC'able members are copied into.
Will provide a test case later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74984 91177308-0d34-0410-b5e6-96231b3b80d8