- Apr 07, 2008
-
-
Chris Lattner authored
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
-
Chris Lattner authored
getFloatingTypeOrder) instead of a type. Fix a fixme. llvm-svn: 49297
-
Chris Lattner authored
llvm-svn: 49296
-
Chris Lattner authored
llvm-svn: 49295
-
Chris Lattner authored
While I'm at it, clean up a bit of maxIntegerType. llvm-svn: 49292
-
- Apr 06, 2008
-
-
Chris Lattner authored
llvm-svn: 49273
-
Chris Lattner authored
-Renamed ContextDecl -> DeclContext -Removed DeclContext pointer from FieldDecl -EnumDecl inherits from DeclContext, instead of TagDecl Patch by Argiris Kirtzidis! llvm-svn: 49261
-
- Apr 05, 2008
-
-
Chris Lattner authored
subsuming) my patch for PR1999. llvm-svn: 49251
-
- Apr 04, 2008
-
-
Steve Naroff authored
Without this, the diagnostic is very confusing. The diag is now consistent with gcc as well. llvm-svn: 49214
-
Chris Lattner authored
-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
-
Nate Begeman authored
This prevents things like a += b[0]; where a is a float4 and b is a float4 * (address_space 1) llvm-svn: 49199
-
- Apr 03, 2008
-
-
Chris Lattner authored
the LHS for null twice. llvm-svn: 49138
-
- Apr 02, 2008
-
-
Steve Naroff authored
Change ObjCInterfaceDecl to inherit from NamedDecl (not TypeDecl). While ObjCInterfaceDecl is arguably a TypeDecl, it isn't a ScopedDecl. Since TypeDecl's are scoped, it makes sense to simply treat them as NamedDecl's. I could have fiddled a bit more with the hierarchy (in terms of creating a non-scoped TypeDecl), however this probably isn't worth the effort. I also finished unifying access to scope decl change by converting Sema::getObjCInterfaceDecl() to use Sema::LookupDecl(). This is much cleaner now:-) llvm-svn: 49107
-
Chris Lattner authored
llvm-svn: 49101
-
Chris Lattner authored
allowing them to be treated the same in some contexts. A suggestion for a better name is welcome :) llvm-svn: 49100
-
Chris Lattner authored
llvm-svn: 49098
-
Steve Naroff authored
Two changes to Sema::LookupDecl() interface. (1) Remove IdLoc (it's never used). (2) Add a bool to enable/disable lazy builtin creaation (defaults to true). This enables us to use LookupDecl() in Sema::isTypeName(), which is also part of this commit. To make this work, I changed isTypeName() to be a non-const member function. I'm not happy with this, however I fiddled with making LookupDecl() and friends const and it got ugly pretty quickly. We can certainly add it back if/when someone has time to fiddle with it. For now, I thought this simplification was more important than retaining the const-ness. llvm-svn: 49087
-
Chris Lattner authored
object type". Add a predicate that checks exactly this, as it is equivalent to checking ot see if the type is *not* a function type, which is faster to check. llvm-svn: 49082
-
Chris Lattner authored
object or incomplete types shall not be restrict-qualified." 2) Warn about qualifiers on function types: C99 6.7.3p8: "If the specification of a function type includes any type qualifiers, the behavior is undefined." 3) Implement restrict on C++ references. 4) fix some locations for various C++ reference diagnostics. llvm-svn: 49081
-
Chris Lattner authored
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
-
Chris Lattner authored
functionality change. llvm-svn: 49072
-
Chris Lattner authored
llvm-svn: 49068
-
Steve Naroff authored
llvm-svn: 49066
-
Steve Naroff authored
Fairly large "cleaup" related to changing ObjCCompatibleAliasDecl superclass (to inherit from NamedDecl, instead of ScopedDecl). - Added a DenseMap to associate an IdentifierInfo with the ObjCCompatibleAliasDecl. - Renamed LookupScopedDecl->LookupDecl and changed it's return type to Decl. Also added lookup for ObjCCompatibleAliasDecl's. - Removed Sema::LookupInterfaceDecl(). Converted clients to used LookupDecl(). - Some minor indentation changes. Will deal with ObjCInterfaceDecl and getObjCInterfaceDecl() in a separate commit... llvm-svn: 49058
-
- Mar 31, 2008
-
-
Chris Lattner authored
Fix objc ivar lookup. Ivar lookup should occur between lookup of method-local values and lookup of globals. Emulate this with some logic in the handling of Sema::ActOnIdentifierExpr. Two todo's left: 1) sema shouldn't turn a bare reference to an ivar into "self->ivar" in the AST. This is a hack. 2) The new ScopedDecl::isDefinedOutsideFunctionOrMethod method does not correctly handle typedefs and enum constants yet. llvm-svn: 48972
-
- Mar 28, 2008
-
-
Steve Naroff authored
llvm-svn: 48924
-
- Mar 26, 2008
-
-
Steve Naroff authored
llvm-svn: 48841
-
Nuno Lopes authored
# this is my first commit here, so please be gentle :) llvm-svn: 48807
-
- Mar 25, 2008
-
-
Nate Begeman authored
the future, RecordTypes. llvm-svn: 48784
-
- Mar 20, 2008
-
-
Steve Naroff authored
llvm-svn: 48571
-
-
- Mar 17, 2008
-
-
Nate Begeman authored
llvm-svn: 48461
-
Chris Lattner authored
like the rest of the classes. llvm-svn: 48434
-
- Mar 16, 2008
-
-
Chris Lattner authored
the allocation in the class, not in sema. llvm-svn: 48433
-
Chris Lattner authored
llvm-svn: 48432
-
Chris Lattner authored
llvm-svn: 48428
-
Chris Lattner authored
specified. Previously, the ctor would allocate memory for the list and then it would get filled in later. Move the allocation+filling in to be more consistent with other stuff, e.g. the addMethods method. llvm-svn: 48427
-
Chris Lattner authored
llvm-svn: 48426
-
Chris Lattner authored
llvm-svn: 48423
-
Chris Lattner authored
a protocol could smash more references in than are allocated. llvm-svn: 48411
-