- Jul 11, 2009
-
-
Steve Naroff authored
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
-
- Jul 10, 2009
-
-
Fariborz Jahanian authored
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
-
Fariborz Jahanian authored
llvm-svn: 75178
-
- Jul 09, 2009
-
-
Fariborz Jahanian authored
class object's base and members under -Wreorder flag. llvm-svn: 75168
-
Anders Carlsson authored
llvm-svn: 75152
-
Anders Carlsson authored
llvm-svn: 75150
-
Douglas Gregor authored
Add test for C++ [over.over.]p1, the contexts in which one can take the address of an overloaded function. llvm-svn: 75146
-
Anders Carlsson authored
Store the isAddressOfOperand in the UnresolvedDeclRefExpr, so that we can pass it when instantiating the expr. Fixes another member pointer bug. llvm-svn: 75075
-
Douglas Gregor authored
address of an overloaded function (which may involve both functions and function templates). llvm-svn: 75069
-
- Jul 08, 2009
-
-
Anders Carlsson authored
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
-
Douglas Gregor authored
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
-
Douglas Gregor authored
llvm-svn: 74999
-
Douglas Gregor authored
namespaces based on the template arguments of a class template specialization type. llvm-svn: 74993
-
Fariborz Jahanian authored
when struct variables with GC'able members are copied into. Will provide a test case later. llvm-svn: 74984
-
Chris Lattner authored
Also, enable them in sema so that they are tested, and now that the x86 backend has stablized. llvm-svn: 74983
-
Douglas Gregor authored
llvm-svn: 74971
-
Douglas Gregor authored
llvm-svn: 74966
-
Douglas Gregor authored
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
-
- Jul 07, 2009
-
-
Nate Begeman authored
llvm-svn: 74951
-
Sebastian Redl authored
llvm-svn: 74943
-
Anders Carlsson authored
llvm-svn: 74937
-
Fariborz Jahanian authored
llvm-svn: 74935
-
Douglas Gregor authored
declaration for a builtin. llvm-svn: 74917
-
Douglas Gregor authored
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
-
- Jul 06, 2009
-
-
Douglas Gregor authored
Fix a problem with false diagnostics when comparing distinct NULL pointer types, from David Majnemer llvm-svn: 74850
-
Douglas Gregor authored
from Enea Zaffanella! llvm-svn: 74831
-
- Jul 04, 2009
-
-
Sebastian Redl authored
llvm-svn: 74787
-
- Jul 02, 2009
-
-
Fariborz Jahanian authored
using ASTContxt allocation. llvm-svn: 74717
-
Douglas Gregor authored
declaration in the AST. The new ASTContext::getCommentForDecl function searches for a comment that is attached to the given declaration, and returns that comment, which may be composed of several comment blocks. Comments are always available in an AST. However, to avoid harming performance, we don't actually parse the comments. Rather, we keep the source ranges of all of the comments within a large, sorted vector, then lazily extract comments via a binary search in that vector only when needed (which never occurs in a "normal" compile). Comments are written to a precompiled header/AST file as a blob of source ranges. That blob is only lazily loaded when one requests a comment for a declaration (this never occurs in a "normal" compile). The indexer testbed now supports comment extraction. When the -point-at location points to a declaration with a Doxygen-style comment, the indexer testbed prints the associated comment block(s). See test/Index/comments.c for an example. Some notes: - We don't actually attempt to parse the comment blocks themselves, beyond identifying them as Doxygen comment blocks to associate them with a declaration. - We won't find comment blocks that aren't adjacent to the declaration, because we start our search based on the location of the declaration. - We don't go through the necessary hops to find, for example, whether some redeclaration of a declaration has comments when our current declaration does not. Similarly, we don't attempt to associate a \param Foo marker in a function body comment with the parameter named Foo (although that is certainly possible). - Verification of my "no performance impact" claims is still "to be done". llvm-svn: 74704
-
Fariborz Jahanian authored
Per Doug's comments. Doug please review. llvm-svn: 74666
-
Douglas Gregor authored
by distinguishing between substitution that occurs for template argument deduction vs. explicitly-specifiad template arguments. This is used both to improve diagnostics and to make sure we only provide SFINAE in those cases where SFINAE should apply. In addition, deal with the sticky issue where SFINAE only considers substitution of template arguments into the *type* of a function template; we need to issue hard errors beyond this point, as test/SemaTemplate/operator-template.cpp illustrates. llvm-svn: 74651
-
- Jul 01, 2009
-
-
Fariborz Jahanian authored
Also has fix for bugzilla-4469. llvm-svn: 74631
-
Steve Naroff authored
This was necessary to simplify some other changes I'm making (wrt ObjC type cleanups). The idea is to separate the constraint checks for block pointers, ObjC pointers, and C pointers (the previous code combined them into one clause). Note: This routine will be further simplified when I integrate the ObjC type cleanups (forthcoming). llvm-svn: 74604
-
Douglas Gregor authored
are fewer template arguments than there are template parameters for that function. llvm-svn: 74578
-
Douglas Gregor authored
substitute those template arguments into the function parameter types prior to template argument deduction. There's still a bit of work to do to make this work properly when only some of the template arguments are specified. llvm-svn: 74576
-
Fariborz Jahanian authored
list. llvm-svn: 74571
-
Douglas Gregor authored
templates, such as make<int&>. These template-ids are only barely functional for function calls; much more to come. llvm-svn: 74563
-
- Jun 30, 2009
-
-
Fariborz Jahanian authored
fields in the ctor-initializer list. llvm-svn: 74554
-
Fariborz Jahanian authored
in ctor-initializer list. llvm-svn: 74541
-
Douglas Gregor authored
instantiation stack so that we provide a full instantiation backtrace. Previously, we performed all of the instantiations implied by the recursion, but each looked like a "top-level" instantiation. The included test case tests the previous fix for the instantiation of DeclRefExprs. Note that the "instantiated from" diagnostics still don't tell us which template arguments we're instantiating with. llvm-svn: 74540
-