Devang Patel
450f266095
New testcase for rev 75503.
...
llvm-svn: 75504
2009-07-13 21:20:20 +00:00
Chris Lattner
d1d820ed51
add netbsd support, patch by Krister Kalfridsson!
...
llvm-svn: 75492
2009-07-13 20:29:08 +00:00
Fariborz Jahanian
494720b7f7
Added pretty-printing support for constructor definition.
...
llvm-svn: 75487
2009-07-13 20:18:13 +00:00
Steve Naroff
2efbbe3531
- Improve comment for Type::getPointeeType().
...
- Remove a couple redundant casts/returns.
- Fix 80 column violations for all getAsStringInternal() methods.
llvm-svn: 75485
2009-07-13 19:06:52 +00:00
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
Ted Kremenek
da98f732cb
Rename potentially ambiguous member template 'getRegion' to 'getSubRegion' to hopefully resolve template lookup ambiguities on some compilers.
...
llvm-svn: 75253
2009-07-10 16:51:45 +00:00
Chris Lattner
53ea7db5e3
linkify
...
llvm-svn: 75225
2009-07-10 05:07:59 +00:00
Argyrios Kyrtzidis
bff082aec9
Add documentation for the Index library to clang's web page.
...
llvm-svn: 75222
2009-07-10 03:41:36 +00:00
Argyrios Kyrtzidis
6dd7181ed4
Simplify a bit by using functions instead of checking enum values. No functionality change.
...
llvm-svn: 75221
2009-07-10 03:41:26 +00:00
Ted Kremenek
f66557978e
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.
llvm-svn: 75209
2009-07-10 00:41:58 +00:00
Fariborz Jahanian
5582f231f2
don't crash if class is using itself as its super class.
...
llvm-svn: 75178
2009-07-09 22:08:26 +00:00
Anders Carlsson
cf1441ab20
Fix another decltype crash.
...
llvm-svn: 75175
2009-07-09 22:00:53 +00:00
Fariborz Jahanian
341583c3ac
Sema check on out of order object initialization of
...
class object's base and members under -Wreorder flag.
llvm-svn: 75168
2009-07-09 19:59:47 +00:00
Anders Carlsson
17973e684d
Use getDeclName in DefineImplicitOverloadedAssign as well.
...
llvm-svn: 75152
2009-07-09 17:47:25 +00:00
Douglas Gregor
b05ce0f395
Another little test for C++ [over.over]
...
llvm-svn: 75151
2009-07-09 17:44:05 +00:00
Anders Carlsson
52b9180587
Pass the DeclName to the diagnostic builder so that member names will be quoted correctly.
...
llvm-svn: 75150
2009-07-09 17:37:12 +00:00
Ted Kremenek
7127801201
Update checker build.
...
llvm-svn: 75147
2009-07-09 17:20:25 +00:00
Douglas Gregor
6b6ba8bad8
Add test for C++ [over.over.]p1, the contexts in which one can take the address of an overloaded function.
...
llvm-svn: 75146
2009-07-09 17:16:51 +00:00
Zhongxing Xu
1796772267
Remove dead code.
...
llvm-svn: 75127
2009-07-09 09:17:11 +00:00
Anders Carlsson
03f89b1828
Store the isAddressOfOperand in the UnresolvedDeclRefExpr, so that we can pass it when instantiating the expr. Fixes another member pointer bug.
...
llvm-svn: 75075
2009-07-09 00:05:08 +00:00
Douglas Gregor
b257e4fff8
Implement the simple form of overload resolution used when taking the
...
address of an overloaded function (which may involve both functions
and function templates).
llvm-svn: 75069
2009-07-08 23:33:52 +00:00
Ted Kremenek
8ee3dd7cc5
Fix: <rdar://problem/7034511> ValueManager::makeIntVal(uint64_t X, QualType T) should return a 'Loc' when 'T' is a pointer
...
llvm-svn: 75062
2009-07-08 22:42:46 +00:00
Anders Carlsson
0b675f5ad5
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.
...
llvm-svn: 75054
2009-07-08 21:45:58 +00:00
Douglas Gregor
79ca34de78
Bump the PCH version number
...
llvm-svn: 75049
2009-07-08 21:07:44 +00:00
Douglas Gregor
9b14658713
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.
llvm-svn: 75044
2009-07-08 20:55:45 +00:00
Owen Anderson
c9673d5bae
Update for IRBuilder API change.
...
llvm-svn: 75041
2009-07-08 20:52:20 +00:00
Owen Anderson
c10c8d3e2b
Update for LLVM API change.
...
llvm-svn: 75028
2009-07-08 19:05:04 +00:00
Anders Carlsson
5b2095ce16
Implement code generation of ChooseExpr for aggregate types.
...
llvm-svn: 75021
2009-07-08 18:33:14 +00:00
Fariborz Jahanian
8e0d04249d
Patch adds test to my previous patch for assigning to
...
gc'able structs in the Next runtime and adds missing
PCH info.
llvm-svn: 75014
2009-07-08 16:37:44 +00:00
Chris Lattner
26670dcba1
fix PR4513, a build problem with VC++, patch by James Abbatiello!
...
llvm-svn: 75013
2009-07-08 16:24:37 +00:00
Duncan Sands
9cb27e9c08
Correct FreeBSD target info, fixing PR4514.
...
Patch by Roman Divacky.
llvm-svn: 75003
2009-07-08 13:55:08 +00:00
Douglas Gregor
be759256b9
Fix a corner case with argument-dependent lookup and overloaded function sets.
...
llvm-svn: 74999
2009-07-08 10:57:20 +00:00
Douglas Gregor
ed3c80eb75
Update the C++ status table to better reflect our support for function overloading
...
llvm-svn: 74997
2009-07-08 10:03:09 +00:00
Douglas Gregor
197e5f7bb7
Improve argument-dependent lookup to find associated classes and
...
namespaces based on the template arguments of a class template
specialization type.
llvm-svn: 74993
2009-07-08 07:51:57 +00:00
Argyrios Kyrtzidis
d8ffadcd82
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.
llvm-svn: 74989
2009-07-08 02:17:42 +00:00
Owen Anderson
9f211fb4fa
Update for LLVM API change.
...
llvm-svn: 74986
2009-07-08 01:29:18 +00:00
Fariborz Jahanian
5f21d2f69a
Implemented memmove_collectable API for Next runtime
...
when struct variables with GC'able members are copied into.
Will provide a test case later.
llvm-svn: 74984
2009-07-08 01:18:33 +00:00
Chris Lattner
2a7deb64c0
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.
llvm-svn: 74983
2009-07-08 01:08:03 +00:00
Douglas Gregor
abd6813ff9
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...
llvm-svn: 74975
2009-07-08 00:03:05 +00:00
Douglas Gregor
d3cb356d14
Overload resolution prefers non-templates to templates
...
llvm-svn: 74971
2009-07-07 23:38:56 +00:00
Douglas Gregor
9fc6097145
Template argument deduction from a call has improved a bit
...
llvm-svn: 74966
2009-07-07 23:12:18 +00:00
Douglas Gregor
e81f3e71f8
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.
llvm-svn: 74965
2009-07-07 23:09:34 +00:00
Nate Begeman
425038cc6d
Extra vector element initializers in OpenCL is an error, not a warning.
...
llvm-svn: 74951
2009-07-07 21:53:06 +00:00
Sebastian Redl
86be854fa8
Implement checking of exception spec compatibility for overriding virtual functions.
...
llvm-svn: 74943
2009-07-07 20:29:57 +00:00
Anders Carlsson
1f9648da17
Some (most) type trait expressions require that the argument passed in is a complete type.
...
llvm-svn: 74937
2009-07-07 19:06:02 +00:00
Fariborz Jahanian
385db80cc5
Diagnose, and not crash, when taking address of property expression.
...
llvm-svn: 74935
2009-07-07 18:50:52 +00:00
Chris Lattner
de50a0c251
Convert the CharInfo table to be statically initialized, instead of dynamically initialized. Patch by Ryan Flynn!
...
llvm-svn: 74919
2009-07-07 17:09:54 +00:00
Douglas Gregor
2074977695
Tighten up the conditions under which we build an implicit function
...
declaration for a builtin.
llvm-svn: 74917
2009-07-07 17:00:05 +00:00
Douglas Gregor
27821cee82
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.
llvm-svn: 74911
2009-07-07 16:35:42 +00:00
Fariborz Jahanian
003a880c41
A few change per Doug's feedback.
...
- Fariborz
llvm-svn: 74909
2009-07-07 16:24:08 +00:00
Zhongxing Xu
6999b90146
Fix comment.
...
llvm-svn: 74896
2009-07-07 07:14:55 +00:00
Chris Lattner
5c34938aa4
fix an out-of-date comment.
...
llvm-svn: 74894
2009-07-07 05:05:42 +00:00
Sanjiv Gupta
30f95ec27d
pic16 preproc defs.
...
llvm-svn: 74893
2009-07-07 04:42:23 +00:00
Zhongxing Xu
cf67e61faa
fix comment.
...
llvm-svn: 74890
2009-07-07 01:36:53 +00:00
Argyrios Kyrtzidis
3f50f7e853
Refactor DeclLocResolver/StmtLocResolver into a more functional style by removing the search state
...
and by having their Visit* methods return the ASTLocation directly.
llvm-svn: 74887
2009-07-07 00:53:31 +00:00
Douglas Gregor
0086a5a3bb
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>.
llvm-svn: 74885
2009-07-07 00:12:59 +00:00
Ted Kremenek
97213bac53
NewCastRegion: Handle casts *from* pointers to incomplete structs to other types.
...
llvm-svn: 74884
2009-07-06 23:47:19 +00:00
Ted Kremenek
0ee2913215
Fix 80 col violation.
...
llvm-svn: 74877
2009-07-06 22:59:23 +00:00
Ted Kremenek
309d3c6db0
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.
llvm-svn: 74876
2009-07-06 22:56:37 +00:00
Ted Kremenek
f45778f425
Fix 80 col violation.
...
llvm-svn: 74875
2009-07-06 22:40:36 +00:00
Ted Kremenek
bb5a62d46e
NewCastRegion: Handle casts to any Objective-C pointer, not just qualified ids.
...
llvm-svn: 74874
2009-07-06 22:39:40 +00:00
Ted Kremenek
83b5ccbecf
Implement FIXME.
...
llvm-svn: 74872
2009-07-06 22:34:50 +00:00
Ted Kremenek
fdf5d802a8
Unbreak build by including header.
...
llvm-svn: 74870
2009-07-06 22:26:23 +00:00
Ted Kremenek
c5ab3a0eab
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.
llvm-svn: 74867
2009-07-06 22:23:45 +00:00
Ted Kremenek
eea8c29aa3
Make 'BasicStoreManager' + 'NewCastRegion' testable from the command line using '-analyzer-store=basic-new-cast'.
...
llvm-svn: 74865
2009-07-06 21:58:46 +00:00
Argyrios Kyrtzidis
26e8b9c9c1
Update CMake files.
...
llvm-svn: 74864
2009-07-06 21:38:29 +00:00
Argyrios Kyrtzidis
85b18aff24
Use the "ASTLocation nomenclature" (instead of the ASTNode one) in index-test.cpp.
...
llvm-svn: 74863
2009-07-06 21:35:26 +00:00
Argyrios Kyrtzidis
b8020f0833
Some changes to ASTLocation's methods
...
-Change hasStmt() to isStmt()
-Add isDecl()
-Add getSourceRange()
llvm-svn: 74862
2009-07-06 21:35:20 +00:00
Argyrios Kyrtzidis
b89c4cba7d
Add some comments to the ASTLocation class.
...
llvm-svn: 74861
2009-07-06 21:35:09 +00:00
Argyrios Kyrtzidis
f24249554b
Move the 'ResolveLocationInAST' function from the Frontend library to the Index library.
...
Also, cut down its comments; more comments will be added to ASTLocation.
llvm-svn: 74860
2009-07-06 21:35:02 +00:00
Argyrios Kyrtzidis
63afa49add
Move ASTLocation and DeclReferenceMap from the AST library to the Index library.
...
llvm-svn: 74859
2009-07-06 21:34:47 +00:00
Argyrios Kyrtzidis
b0048027ba
Rename 'ASTNode' -> 'ASTLocation'.
...
ASTLocation is a much better name for its intended purpose which to represent a "point" into the AST.
llvm-svn: 74858
2009-07-06 21:34:20 +00:00
Ted Kremenek
9848b557c8
NewCastRegion:
...
- Have test for 'CodeTextRegion' dominate other region tests.
- Use 'getAsRecordType' instead of isa<RecordType>
llvm-svn: 74853
2009-07-06 21:01:16 +00:00
Ted Kremenek
3ad4b3bca3
Fix loop so that 'continue' statements actually cause the loop to iterate.
...
llvm-svn: 74852
2009-07-06 20:53:52 +00:00
Ted Kremenek
9e010e11c3
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.
llvm-svn: 74851
2009-07-06 20:21:51 +00:00
Douglas Gregor
e64c196868
Fix a problem with false diagnostics when comparing distinct NULL pointer types, from David Majnemer
...
llvm-svn: 74850
2009-07-06 20:14:23 +00:00
Ted Kremenek
b1281025f1
Update checker build.
...
llvm-svn: 74849
2009-07-06 19:57:59 +00:00
Douglas Gregor
1342e84c17
Fix PR 4489, a crash in PCH loading that occurs when loading the name
...
of a top-level declaration loads another top-level declaration of the
same name whose type depends on the first declaration having been
completed. This commit breaks the circular dependency by delaying
loads of top-level declarations triggered by loading a name until we
are no longer recursively loading types or declarations.
llvm-svn: 74847
2009-07-06 18:54:52 +00:00
Ted Kremenek
0578e43862
Fix <rdar://problem/7033733>. The CF_RETURNS_RETAINED attribute should work if the return type on an Objective-C method is a CF type reference, not just an Objective-C object reference.
...
llvm-svn: 74841
2009-07-06 18:30:43 +00:00
Douglas Gregor
dce892e128
Parsing fix for out-of-line constructors, from Piotr Rak
...
llvm-svn: 74833
2009-07-06 16:40:48 +00:00
Douglas Gregor
9d243d47dd
Fix out-of-source regression testing for makefiles
...
llvm-svn: 74832
2009-07-06 16:35:57 +00:00
Douglas Gregor
04318256b7
Keep track of the Expr used to describe the size of an array type,
...
from Enea Zaffanella!
llvm-svn: 74831
2009-07-06 15:59:29 +00:00
Douglas Gregor
19623dc075
Fix bitfield promotion in the presence of explicit casts, from Abrama Bagnara.
...
llvm-svn: 74830
2009-07-06 15:38:40 +00:00
Zhongxing Xu
e1a3ace8ab
Further cleanup of region invalidation code. No functionality change.
...
llvm-svn: 74816
2009-07-06 06:01:24 +00:00
Zhongxing Xu
45b5302eaa
AllocaRegion and SymbolicRegion are both boundable.
...
llvm-svn: 74815
2009-07-06 05:34:56 +00:00
Zhongxing Xu
1fb1cf4e26
Start to gradually move region invalidation code into store manager.
...
No functionality change.
llvm-svn: 74812
2009-07-06 03:41:27 +00:00
Argyrios Kyrtzidis
1561c6cf54
Having tests that depend on previously created files is bad idea. Fix them to be self-sufficient.
...
llvm-svn: 74810
2009-07-06 00:03:47 +00:00
Eli Friedman
c131d3b5a2
Fix for PR4502: add calculation of the integer conversion rank for
...
wchar_t.
llvm-svn: 74808
2009-07-05 23:44:27 +00:00
Eli Friedman
245f229df4
More tweaks to types for OpenBSD. Patch by Jonathan Gray.
...
llvm-svn: 74805
2009-07-05 22:31:18 +00:00
Argyrios Kyrtzidis
5641111e3f
Make use of the Index library through the index-test tool.
...
'index-test' is now able to provide additional info for a Decl, through multiple AST files:
-Find declarations
-Find definitions
-Find references
llvm-svn: 74803
2009-07-05 22:22:35 +00:00
Argyrios Kyrtzidis
fe37cc831b
Introduce the 'Index' library.
...
Its purpose is to provide the basic infrastructure for cross-translation-unit analysis like indexing, refactoring, etc.
Currently it is very "primitive" and with no type-names support. It can provide functionality like
"show me all references of this function from these translation units".
llvm-svn: 74802
2009-07-05 22:22:19 +00:00
Argyrios Kyrtzidis
e568a9792f
Introduce the DeclReferenceMap class inside the AST library.
...
DeclReferenceMap (similar to ParentMap) is a helper class for mapping Decls to the AST nodes that reference them.
A client will initialize it by passing an ASTContext to its constructor and later use it to iterate over
the references of a Decl.
References are mapped and retrieved using the primary declaration (Decl::getPrimaryDecl()) of a particular Decl.
llvm-svn: 74801
2009-07-05 22:22:06 +00:00
Argyrios Kyrtzidis
02dd4f9389
Introduce the virtual method Decl::getPrimaryDecl().
...
When a Decl subclass can have multiple re-declarations in the same declaration context (like FunctionDecl),
getPrimaryDecl() will return a particular Decl that all of them will point to as the "primary" declaration.
llvm-svn: 74800
2009-07-05 22:21:56 +00:00
Argyrios Kyrtzidis
cdfe1f210b
Avoid re-checking the parameters of a function, when trying to resolve a location.
...
llvm-svn: 74799
2009-07-05 22:21:46 +00:00
Argyrios Kyrtzidis
a4d36d5a58
Make use of ASTNode for return value of clang::ResolveLocationInAST() and in the index-test tool.
...
llvm-svn: 74798
2009-07-05 22:21:40 +00:00
Argyrios Kyrtzidis
97e10d64e8
Introduce ASTNode class into the AST library.
...
ASTNode is an immutable pair of a Decl and Stmt. If Stmt is not null, Decl should be its immediate parent.
llvm-svn: 74797
2009-07-05 22:21:28 +00:00
Argyrios Kyrtzidis
62afb198be
Do an early check for function definition.
...
llvm-svn: 74796
2009-07-05 22:21:17 +00:00
Eli Friedman
e3aa454e2f
Per PR4506, fix the type of size_t on OpenBSD.
...
llvm-svn: 74795
2009-07-05 18:47:56 +00:00
Zhongxing Xu
66db13b7ac
CompoundLiteralRegion is boundable when it is not in the file scope.
...
llvm-svn: 74788
2009-07-04 11:43:03 +00:00
Sebastian Redl
4f4d7b5d8e
Catch function redeclarations with incompatible exception specifications.
...
llvm-svn: 74787
2009-07-04 11:39:00 +00:00
Zhongxing Xu
108f89cbfa
StringRegion is not boundable.
...
llvm-svn: 74786
2009-07-04 11:31:53 +00:00