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