summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
Commit message (Collapse)AuthorAgeFilesLines
* -Changes to TagDecl:Argyrios Kyrtzidis2008-06-091-7/+7
| | | | | | | | | Added TagKind enum. Added getTagKind() method. Added convenience methods: isEnum(), isStruct(), isUnion(), isClass(). -RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one. llvm-svn: 52160
* During interface layout, don't forget super class.Devang Patel2008-06-061-2/+14
| | | | llvm-svn: 52035
* Undo previous check-in.Devang Patel2008-06-061-9/+1
| | | | llvm-svn: 52034
* During interface layout, don't forget super class.Devang Patel2008-06-061-1/+9
| | | | llvm-svn: 52033
* Add ObjCInterface layout support.Devang Patel2008-06-041-0/+43
| | | | | | Reuse RecordLayout. llvm-svn: 51968
* Refactoring. Devang Patel2008-06-041-74/+80
| | | | | | Move field layout code in a ASTRecordLayout member fn. llvm-svn: 51966
* Moved LangOptions from TranslationUnit to ASTContext. This induced a ↵Ted Kremenek2008-06-041-1/+7
| | | | | | variety of cleanups in some ASTConsumers. llvm-svn: 51943
* ASTContext::typesAreCompatible(): id is compatible with all qualified id types.Steve Naroff2008-06-041-1/+10
| | | | llvm-svn: 51939
* Cleanup/refactoring of Sema struct layout. This patch unifies the structEli Friedman2008-05-301-98/+79
| | | | | | | | | | and union codepaths and fixes some minor bugs. I'm reasonably confident this is accurate, at least for X86. I'll correct any bugs as I find them; I haven't found any for a while, though. llvm-svn: 51762
* Stop leaking the TUDecl.Eli Friedman2008-05-271-0/+2
| | | | llvm-svn: 51575
* Add Destroy method to Types, making there destruction more harmonious withTed Kremenek2008-05-211-7/+1
| | | | | | the destruction of Decls and Stmts. llvm-svn: 51385
* Fixup ASTContext::PrintStats()...it was causing several test failures.Steve Naroff2008-05-211-1/+10
| | | | llvm-svn: 51380
* Remove hacks from ASTContext now that alignment gets reported correctly.Eli Friedman2008-05-201-11/+3
| | | | llvm-svn: 51322
* OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris.Nate Begeman2008-04-181-10/+10
| | | | llvm-svn: 49942
* Addition of TranslationUnitDecl to the AST:Argyrios Kyrtzidis2008-04-171-1/+5
| | | | | | | | -Added TranslationUnitDecl class to serve as top declaration context -ASTContext gets a TUDecl member and a getTranslationUnitDecl() function -All ScopedDecls get the TUDecl as DeclContext when declared at global scope llvm-svn: 49855
* Introduce support for finding class and enum names via ordinary name lookup ↵Douglas Gregor2008-04-131-9/+23
| | | | | | in C++ llvm-svn: 49621
* random whitespace fixes.Chris Lattner2008-04-071-10/+11
| | | | llvm-svn: 49328
* fix a bug I introduced in my previous checkin.Chris Lattner2008-04-071-5/+2
| | | | llvm-svn: 49327
* simplify array compatibility testing.Chris Lattner2008-04-071-12/+12
| | | | llvm-svn: 49326
* simplify reference handling.Chris Lattner2008-04-071-17/+0
| | | | llvm-svn: 49325
* move some code around, no other change.Chris Lattner2008-04-071-63/+67
| | | | llvm-svn: 49324
* simplify compatibility testing for tag types.Chris Lattner2008-04-071-9/+12
| | | | llvm-svn: 49323
* merge compatibility testing of qualified/unqualified interfaces togetherChris Lattner2008-04-071-41/+36
| | | | | | and fix a bug. llvm-svn: 49322
* MyOtherClass<MyProtocol>* is compatible with MyClass*Chris Lattner2008-04-071-1/+2
| | | | | | | if MyClass is a superclass of MyOtherClass, there is no need for an exact interface match. llvm-svn: 49320
* Remove a dead check for compatible builtin typesChris Lattner2008-04-071-10/+4
| | | | llvm-svn: 49319
* futher simplify compatibility testing of objc interface types.Chris Lattner2008-04-071-25/+20
| | | | llvm-svn: 49318
* ocuvector and vector should be compatible. Fix ASQual compatibility.Chris Lattner2008-04-071-11/+24
| | | | llvm-svn: 49316
* Fix comment typo, do reference eval at the correct type.Chris Lattner2008-04-071-8/+9
| | | | llvm-svn: 49315
* simplify vector type compatibility testing.Chris Lattner2008-04-071-11/+8
| | | | llvm-svn: 49314
* move ObjCQualifiedIdTypesAreCompatible out of ASTContext into Sema.Chris Lattner2008-04-071-176/+0
| | | | | | | | | | 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
* Replace an O(n^2) algorithm in areCompatObjCQualInterfaces withChris Lattner2008-04-071-14/+26
| | | | | | | an O(n) algorithm by taking advantage of the fact that the protocol qualifier list is already guaranteed sorted. llvm-svn: 49312
* move sorting of qualifying protocols from the parser intoChris Lattner2008-04-071-3/+28
| | | | | | | | 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
* eliminate getReferencedProtocols from Chris Lattner2008-04-071-40/+38
| | | | | | | ObjCQualifiedIdType/ObjCQualifiedInterfaceType, adding an interator interface instead. llvm-svn: 49308
* make QualifiedInterfaceTypesAreCompatible a static functionChris Lattner2008-04-071-16/+12
| | | | | | and start simplifying it. llvm-svn: 49307
* This predicate is just a generic "issuperclass" predicate, move it to theChris Lattner2008-04-071-17/+6
| | | | | | ObjCInterfaceType as a method. llvm-svn: 49306
* Simplify some objc compatibility testing, make interfaceTypesAreCompatibleChris Lattner2008-04-071-57/+49
| | | | | | a static function named isCompatibleInterfaceAssign. llvm-svn: 49305
* simplify the logic in ASTContext::objcTypesAreCompatibleChris Lattner2008-04-071-14/+14
| | | | llvm-svn: 49302
* clean up some logic in objc type handling. Specifically, make it so thatChris Lattner2008-04-071-10/+11
| | | | | | | there are QualType::getAsObjc* type methods, and make isa<ObjCInterfaceType> return true for ObjCQualifiedInterfaceType's. llvm-svn: 49300
* trivial changes to getFloatingTypeOfSizeWithinDomain, nothing significant.Chris Lattner2008-04-061-15/+12
| | | | llvm-svn: 49298
* simplify max type computation by making it return an integer (like Chris Lattner2008-04-061-43/+54
| | | | | | getFloatingTypeOrder) instead of a type. Fix a fixme. llvm-svn: 49297
* minor simplifications/cleanups to type comparisons.Chris Lattner2008-04-061-10/+12
| | | | llvm-svn: 49296
* Start switching clients over from CT.getCanonicalType() to ↵Chris Lattner2008-04-061-76/+81
| | | | | | | | Context.getCanonicalType(CT) for PR2189. While I'm at it, clean up a bit of maxIntegerType. llvm-svn: 49292
* introduce a new ASTContext::getCanonicalType method. This is the firstChris Lattner2008-04-061-0/+13
| | | | | | step towards fixing PR2189. llvm-svn: 49291
* make use of EnumType to simplify some code, eliminate warningsChris Lattner2008-04-061-63/+28
| | | | | | when assertions are disabled. llvm-svn: 49288
* This patch contains these changes:Chris Lattner2008-04-061-2/+1
| | | | | | | | | | -Renamed ContextDecl -> DeclContext -Removed DeclContext pointer from FieldDecl -EnumDecl inherits from DeclContext, instead of TagDecl Patch by Argiris Kirtzidis! llvm-svn: 49261
* Introduce ContextDecl, patch by Argiris Kirtzidis!Chris Lattner2008-04-041-4/+5
| | | | | | | | | | | -Added ContextDecl (no TranslationUnitDecl) -ScopedDecl class has a ContextDecl member -FieldDecl class has a ContextDecl member, so that a Field or a ObjCIvar can be traced back to their RecordDecl/ObjCInterfaceDecl easily -FunctionDecl, ObjCMethodDecl, TagDecl, ObjCInterfaceDecl inherit from ContextDecl. With TagDecl as ContextDecl, enum constants have a EnumDecl as their context. -Moved Decl class to a "DeclBase.h" along with ContextDecl class -CurContext is handled by Sema llvm-svn: 49208
* qualifier comparisons should be done on canonical types.Chris Lattner2008-04-031-5/+5
| | | | llvm-svn: 49137
* add a common base class "PointerLikeType" for PointerType and ReferenceType,Chris Lattner2008-04-021-5/+5
| | | | | | | allowing them to be treated the same in some contexts. A suggestion for a better name is welcome :) llvm-svn: 49100
* Add a citation.Chris Lattner2008-04-021-1/+3
| | | | llvm-svn: 49080
* Fix several bugs in array -> pointer decomposition.Chris Lattner2008-04-021-0/+65
| | | | | | | | | | | | | | | | First, we got several CVR propagation cases wrong, which Eli pointed out in PR2039. Second, we didn't propagate address space qualifiers correctly, leading to incorrect lowering of code in CodeGen/address-space.c. Third, we didn't uniformly propagate the specifier in the array to the pointer ("int[restrict 4]" -> "int *restrict"). This adds an ASTContext::getArrayDecayedType member that handles the non-trivial logic for this seemingly simple operation. llvm-svn: 49078
OpenPOWER on IntegriCloud