]>
granicus.if.org Git - clang/log
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Chris Lattner [Wed, 8 Jul 2009 01:08:03 +0000 (01:08 +0000)]
reimplement vector comparisons as [fi]cmp+sext instead of using v[if]cmp.
Also, enable them in sema so that they are tested, and now that the x86 backend
has stablized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74983
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 8 Jul 2009 00:03:05 +0000 (00:03 +0000)]
The canonical type of typeof or decltype with a dependent type is itself,
not Context.DependentTy. I'll let Anders check in the test case for this one...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74975
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 7 Jul 2009 23:38:56 +0000 (23:38 +0000)]
Overload resolution prefers non-templates to templates
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74971
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 7 Jul 2009 23:12:18 +0000 (23:12 +0000)]
Template argument deduction from a call has improved a bit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74966
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 7 Jul 2009 23:09:34 +0000 (23:09 +0000)]
Improve template argument deduction from a call. In particular,
implement C++ [temp.deduct.call]p3b3, which allows a template-id
parameter to match a derived class of the argument, while deducing
template arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74965
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 7 Jul 2009 21:53:06 +0000 (21:53 +0000)]
Extra vector element initializers in OpenCL is an error, not a warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74951
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 7 Jul 2009 20:29:57 +0000 (20:29 +0000)]
Implement checking of exception spec compatibility for overriding virtual functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74943
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 7 Jul 2009 19:06:02 +0000 (19:06 +0000)]
Some (most) type trait expressions require that the argument passed in is a complete type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74937
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 7 Jul 2009 18:50:52 +0000 (18:50 +0000)]
Diagnose, and not crash, when taking address of property expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74935
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 7 Jul 2009 17:09:54 +0000 (17:09 +0000)]
Convert the CharInfo table to be statically initialized, instead of dynamically initialized. Patch by Ryan Flynn!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74919
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 7 Jul 2009 17:00:05 +0000 (17:00 +0000)]
Tighten up the conditions under which we build an implicit function
declaration for a builtin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74917
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 7 Jul 2009 16:35:42 +0000 (16:35 +0000)]
Make ASTContext explicitly keep track of the declaration for the C
FILE type, rather than using name lookup to find FILE within the
translation unit. Within precompiled headers, FILE is treated as yet
another "special type" (like __builtin_va_list).
This change should provide a performance improvement (not verified),
since the lookup into the translation unit declaration
forces the (otherwise unneeded) construction of a large hash table.
More importantly, with precompiled headers, the construction
of that table requires deserializing most of the top-level
declarations from the precompiled header, which are then unused.
Fixes PR 4509.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74911
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 7 Jul 2009 16:24:08 +0000 (16:24 +0000)]
A few change per Doug's feedback.
- Fariborz
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74909
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 7 Jul 2009 07:14:55 +0000 (07:14 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74896
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 7 Jul 2009 05:05:42 +0000 (05:05 +0000)]
fix an out-of-date comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74894
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Tue, 7 Jul 2009 04:42:23 +0000 (04:42 +0000)]
pic16 preproc defs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74893
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 7 Jul 2009 01:36:53 +0000 (01:36 +0000)]
fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74890
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 7 Jul 2009 00:53:31 +0000 (00:53 +0000)]
Refactor DeclLocResolver/StmtLocResolver into a more functional style by removing the search state
and by having their Visit* methods return the ASTLocation directly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74887
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 7 Jul 2009 00:12:59 +0000 (00:12 +0000)]
Introduce the notion of "Relocatable" precompiled headers, which are built
with a particular system root directory and can be used with a different
system root directory when the headers it depends on have been installed.
Relocatable precompiled headers rewrite the file names of the headers used
when generating the PCH file into the corresponding file names of the
headers available when using the PCH file.
Addresses <rdar://problem/
7001604 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74885
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 6 Jul 2009 23:47:19 +0000 (23:47 +0000)]
NewCastRegion: Handle casts *from* pointers to incomplete structs to other types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74884
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 6 Jul 2009 22:59:23 +0000 (22:59 +0000)]
Fix 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74877
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 6 Jul 2009 22:56:37 +0000 (22:56 +0000)]
Restructure NewCastRegion to use a switch statement that dispatches off the
region type. This better shows the logic of the method and allows the compiler
to check if we didn't handle a specific region kind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74876
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 6 Jul 2009 22:40:36 +0000 (22:40 +0000)]
Fix 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74875
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 6 Jul 2009 22:39:40 +0000 (22:39 +0000)]
NewCastRegion: Handle casts to any Objective-C pointer, not just qualified ids.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74874
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 6 Jul 2009 22:34:50 +0000 (22:34 +0000)]
Implement FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74872
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 6 Jul 2009 22:26:23 +0000 (22:26 +0000)]
Unbreak build by including header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74870
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 6 Jul 2009 22:23:45 +0000 (22:23 +0000)]
StoreManager::NewCastRegion:
- Refactor logic that creates ElementRegions into a help method 'MakeElementRegion'.
- Fix crash due to not handling StringRegions. Casts of StringRegions now
result in a new ElementRegion layered on the original StringRegion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74867
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 6 Jul 2009 21:58:46 +0000 (21:58 +0000)]
Make 'BasicStoreManager' + 'NewCastRegion' testable from the command line using '-analyzer-store=basic-new-cast'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74865
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 6 Jul 2009 21:38:29 +0000 (21:38 +0000)]
Update CMake files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74864
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 6 Jul 2009 21:35:26 +0000 (21:35 +0000)]
Use the "ASTLocation nomenclature" (instead of the ASTNode one) in index-test.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74863
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 6 Jul 2009 21:35:20 +0000 (21:35 +0000)]
Some changes to ASTLocation's methods
-Change hasStmt() to isStmt()
-Add isDecl()
-Add getSourceRange()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74862
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 6 Jul 2009 21:35:09 +0000 (21:35 +0000)]
Add some comments to the ASTLocation class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74861
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 6 Jul 2009 21:35:02 +0000 (21:35 +0000)]
Move the 'ResolveLocationInAST' function from the Frontend library to the Index library.
Also, cut down its comments; more comments will be added to ASTLocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74860
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 6 Jul 2009 21:34:47 +0000 (21:34 +0000)]
Move ASTLocation and DeclReferenceMap from the AST library to the Index library.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74859
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 6 Jul 2009 21:34:20 +0000 (21:34 +0000)]
Rename 'ASTNode' -> 'ASTLocation'.
ASTLocation is a much better name for its intended purpose which to represent a "point" into the AST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74858
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 6 Jul 2009 21:01:16 +0000 (21:01 +0000)]
NewCastRegion:
- Have test for 'CodeTextRegion' dominate other region tests.
- Use 'getAsRecordType' instead of isa<RecordType>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74853
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 6 Jul 2009 20:53:52 +0000 (20:53 +0000)]
Fix loop so that 'continue' statements actually cause the loop to iterate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74852
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 6 Jul 2009 20:21:51 +0000 (20:21 +0000)]
Move the new 'CastRegion' implementation from RegionStoreManager to StoreManager
(its superclass). This will allow us to experiment with using the new CastRegion
with BasicStoreManager, and gradually phase out the old implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74851
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 6 Jul 2009 20:14:23 +0000 (20:14 +0000)]
Fix a problem with false diagnostics when comparing distinct NULL pointer types, from David Majnemer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74850
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 6 Jul 2009 19:57:59 +0000 (19:57 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74849
91177308 -0d34-0410-b5e6-
96231b3b80d8