Fariborz Jahanian
0152a1a5db
New AST representation for each objc2's property declaration.
...
llvm-svn: 49699
2008-04-14 23:36:35 +00:00
Douglas Gregor
83a586ec19
Introduce support for finding class and enum names via ordinary name lookup in C++
...
llvm-svn: 49621
2008-04-13 21:07:44 +00:00
Chris Lattner
861a226586
This patch is just the easy part of the class names patch, which
...
allows the parsing of "class" in addition to "struct" and "union" to
declare a record. So this patch allows:
class C { };
class C c1;
But it does not contain the lookup bits, so this won't work yet:
C c2;
Patch by Doug Gregor!
llvm-svn: 49613
2008-04-13 18:59:07 +00:00
Sam Bishop
fcd78b02c2
Use static_cast<> instead of cast<> in Decl::Destroy(). Suggestion by Argiris
...
Kirtzidis!
llvm-svn: 49603
2008-04-13 04:32:18 +00:00
Chris Lattner
b0d3844fb8
Default argument cleanups and minor improvements, patch by
...
Doug Gregor!
llvm-svn: 49598
2008-04-12 23:52:44 +00:00
Fariborz Jahanian
4572b45574
AST generation for objc2's property declarations.
...
llvm-svn: 49565
2008-04-11 23:40:25 +00:00
Steve Naroff
5a4611cdda
Add class and super class location info to ObjCInterfaceDecl...
...
llvm-svn: 49553
2008-04-11 19:35:35 +00:00
Sam Bishop
ef8b94ae84
Invoke destructors in Decl::Destroy().
...
llvm-svn: 49547
2008-04-11 18:04:39 +00:00
Sam Bishop
703ae9624b
Stub out and start using a Decl::Destroy() method.
...
llvm-svn: 49532
2008-04-11 15:01:25 +00:00
Sam Bishop
4c088b766d
Use the ASTContext allocator when creating deserialized Decl objects.
...
llvm-svn: 49530
2008-04-11 14:49:10 +00:00
Chris Lattner
58258246ec
Several improvements from Doug Gregor related to default
...
argument handling. I'll fix up the c89 (void) thing next.
llvm-svn: 49459
2008-04-10 02:22:51 +00:00
Sam Bishop
506215c708
Changed the Decl::Kind enum of the ObjCPropertyDecl class, so that it follows
...
the pattern of the other Decl classes.
llvm-svn: 49399
2008-04-08 20:49:25 +00:00
Chris Lattner
aa9c7aed0f
Add support for C++ default arguments, and rework Parse-Sema
...
interaction for function parameters, fixing PR2046.
Patch by Doug Gregor!
llvm-svn: 49369
2008-04-08 04:40:51 +00:00
Sam Bishop
e0680b7e7a
Pass the ASTContext object around when deserializing Decl and Stmt objects, so
...
they can be created using the same allocator as in the "from source code" case.
llvm-svn: 49353
2008-04-07 21:55:54 +00:00
Chris Lattner
4ba0cef93b
random whitespace fixes.
...
llvm-svn: 49328
2008-04-07 07:01:58 +00:00
Chris Lattner
fa00732562
fix a bug I introduced in my previous checkin.
...
llvm-svn: 49327
2008-04-07 06:58:21 +00:00
Chris Lattner
e6b27c6ecd
simplify array compatibility testing.
...
llvm-svn: 49326
2008-04-07 06:56:55 +00:00
Chris Lattner
7460fd297d
simplify reference handling.
...
llvm-svn: 49325
2008-04-07 06:52:53 +00:00
Chris Lattner
49af6a4beb
move some code around, no other change.
...
llvm-svn: 49324
2008-04-07 06:51:04 +00:00
Chris Lattner
ec646834e7
simplify compatibility testing for tag types.
...
llvm-svn: 49323
2008-04-07 06:49:41 +00:00
Chris Lattner
3c7961597f
merge compatibility testing of qualified/unqualified interfaces together
...
and fix a bug.
llvm-svn: 49322
2008-04-07 06:38:24 +00:00
Chris Lattner
64bf6ba308
Fix a really bad bug where type uniquing would merge a<x> with b<x> as the same
...
type, because it did not include a/b in the hash.
llvm-svn: 49321
2008-04-07 06:37:47 +00:00
Chris Lattner
c9062d01d7
MyOtherClass<MyProtocol>* is compatible with MyClass*
...
if MyClass is a superclass of MyOtherClass, there is no need for
an exact interface match.
llvm-svn: 49320
2008-04-07 06:06:56 +00:00
Chris Lattner
7bbd3d75ef
Remove a dead check for compatible builtin types
...
llvm-svn: 49319
2008-04-07 05:55:38 +00:00
Chris Lattner
90bef90ad4
futher simplify compatibility testing of objc interface types.
...
llvm-svn: 49318
2008-04-07 05:53:18 +00:00
Chris Lattner
9555466f7e
ocuvector and vector should be compatible. Fix ASQual compatibility.
...
llvm-svn: 49316
2008-04-07 05:43:21 +00:00
Chris Lattner
aee96c3a90
Fix comment typo, do reference eval at the correct type.
...
llvm-svn: 49315
2008-04-07 05:37:56 +00:00
Chris Lattner
f8a6b4d4fc
simplify vector type compatibility testing.
...
llvm-svn: 49314
2008-04-07 05:36:14 +00:00
Chris Lattner
2a3569b5d9
move ObjCQualifiedIdTypesAreCompatible out of ASTContext into Sema.
...
While it is similar to the other compatibility predicates in ASTContext,
it is not used by them and is different.
In addition, greatly simplify ObjCQualifiedIdTypesAreCompatible and
fix some canonical type bugs. Also, simplify my Type::getAsObjC* methods.
llvm-svn: 49313
2008-04-07 05:30:13 +00:00
Chris Lattner
ae947fe3f9
Replace an O(n^2) algorithm in areCompatObjCQualInterfaces with
...
an O(n) algorithm by taking advantage of the fact that the
protocol qualifier list is already guaranteed sorted.
llvm-svn: 49312
2008-04-07 05:05:41 +00:00
Chris Lattner
e0ea37ace7
move sorting of qualifying protocols from the parser into
...
sema. This allows clients of the parser to have the unmolested
list if desired, and guarantees that noone can create an
ObjCQualifiedInterfaceType with an unsorted list.
llvm-svn: 49310
2008-04-07 04:56:42 +00:00
Chris Lattner
bd7981a978
eliminate getReferencedProtocols from
...
ObjCQualifiedIdType/ObjCQualifiedInterfaceType, adding an interator
interface instead.
llvm-svn: 49308
2008-04-07 04:44:08 +00:00
Chris Lattner
f96084ee73
make QualifiedInterfaceTypesAreCompatible a static function
...
and start simplifying it.
llvm-svn: 49307
2008-04-07 04:17:40 +00:00
Chris Lattner
ae1b6078e3
This predicate is just a generic "issuperclass" predicate, move it to the
...
ObjCInterfaceType as a method.
llvm-svn: 49306
2008-04-07 04:13:03 +00:00
Chris Lattner
ddfdaf9a69
Simplify some objc compatibility testing, make interfaceTypesAreCompatible
...
a static function named isCompatibleInterfaceAssign.
llvm-svn: 49305
2008-04-07 04:07:56 +00:00
Chris Lattner
f8c3e82897
simplify the logic in ASTContext::objcTypesAreCompatible
...
llvm-svn: 49302
2008-04-07 01:30:37 +00:00
Chris Lattner
ba5862e74c
clean up some logic in objc type handling. Specifically, make it so that
...
there are QualType::getAsObjc* type methods, and make isa<ObjCInterfaceType>
return true for ObjCQualifiedInterfaceType's.
llvm-svn: 49300
2008-04-07 00:27:04 +00:00
Chris Lattner
b9dfb03ddb
trivial changes to getFloatingTypeOfSizeWithinDomain, nothing significant.
...
llvm-svn: 49298
2008-04-06 23:58:54 +00:00
Chris Lattner
d4bacd68bf
simplify max type computation by making it return an integer (like
...
getFloatingTypeOrder) instead of a type. Fix a fixme.
llvm-svn: 49297
2008-04-06 23:55:33 +00:00
Chris Lattner
b90739d556
minor simplifications/cleanups to type comparisons.
...
llvm-svn: 49296
2008-04-06 23:38:49 +00:00
Chris Lattner
f1e4ec2898
remove a use of getCanonicalType.
...
llvm-svn: 49294
2008-04-06 23:09:52 +00:00
Chris Lattner
76a00cf3ff
Start switching clients over from CT.getCanonicalType() to Context.getCanonicalType(CT) for PR2189.
...
While I'm at it, clean up a bit of maxIntegerType.
llvm-svn: 49292
2008-04-06 22:59:24 +00:00
Chris Lattner
ed0d0795ff
introduce a new ASTContext::getCanonicalType method. This is the first
...
step towards fixing PR2189.
llvm-svn: 49291
2008-04-06 22:41:35 +00:00
Chris Lattner
7d9b6a9d50
Use EnumType to simplify some code.
...
llvm-svn: 49289
2008-04-06 22:29:16 +00:00
Chris Lattner
8b23c25b21
make use of EnumType to simplify some code, eliminate warnings
...
when assertions are disabled.
llvm-svn: 49288
2008-04-06 22:05:18 +00:00
Chris Lattner
e07e912f5e
Make EnumType/RecordType classof predicates simpler and more efficient in
...
some cases.
llvm-svn: 49287
2008-04-06 22:04:54 +00:00
Chris Lattner
3fb61c1fbb
add a helper EnumType object for asking about tagtypes for enums.
...
llvm-svn: 49286
2008-04-06 21:58:47 +00:00
Chris Lattner
713e6592be
Fix a bug I introduced in my const'ification patch.
...
llvm-svn: 49262
2008-04-06 05:25:03 +00:00
Chris Lattner
0a5ff0d34a
This patch contains these changes:
...
-Renamed ContextDecl -> DeclContext
-Removed DeclContext pointer from FieldDecl
-EnumDecl inherits from DeclContext, instead of TagDecl
Patch by Argiris Kirtzidis!
llvm-svn: 49261
2008-04-06 04:47:34 +00:00
Chris Lattner
157dd0811e
fix a number of const qualification bugs.
...
llvm-svn: 49257
2008-04-06 04:11:27 +00:00