- Mar 22, 2009
-
-
Anders Carlsson authored
llvm-svn: 67476
-
Anders Carlsson authored
Keep track of whether a class is abstract or not. This is currently only used for the __is_abstract type trait. llvm-svn: 67461
-
- Mar 19, 2009
-
-
Douglas Gregor authored
there is a previous declaration marked "static". This fixes PR3645. llvm-svn: 67336
-
Douglas Gregor authored
llvm-svn: 67316
-
Douglas Gregor authored
F f; where F is a typedef of a function type, then the function "f" has a prototype. This is a slight tweak to Chris's suggested fix in PR3817. Fixes PR3817 and PR3840. llvm-svn: 67313
-
Douglas Gregor authored
dependent qualified-ids such as Fibonacci<N - 1>::value where N is a template parameter. These references are "unresolved" because the name is dependent and, therefore, cannot be resolved to a declaration node (as we would do for a DeclRefExpr or QualifiedDeclRefExpr). UnresolvedDeclRefExprs instantiate to DeclRefExprs, QualifiedDeclRefExprs, etc. Also, be a bit more careful about keeping only a single set of specializations for a class template, and instantiating from the definition of that template rather than a previous declaration. In general, we need a better solution for this for all TagDecls, because it's too easy to accidentally look at a declaration that isn't the definition. We can now process a simple Fibonacci computation described as a template metaprogram. llvm-svn: 67308
-
Douglas Gregor authored
specialization names. This way, we keep track of sugared types like std::vector<Real> I believe we are now using QualifiedNameTypes everywhere we can. Next step: QualifiedDeclRefExprs. llvm-svn: 67268
-
Douglas Gregor authored
qualified name, e.g., foo::x so that we retain the nested-name-specifier as written in the source code and can reproduce that qualified name when printing the types back (e.g., in diagnostics). This is PR3493, which won't be complete until finished the other tasks mentioned near the end of this commit. The parser's representation of nested-name-specifiers, CXXScopeSpec, is now a bit fatter, because it needs to contain the scopes that precede each '::' and keep track of whether the global scoping operator '::' was at the beginning. For example, we need to keep track of the leading '::', 'foo', and 'bar' in ::foo::bar::x The Action's CXXScopeTy * is no longer a DeclContext *. It's now the opaque version of the new NestedNameSpecifier, which contains a single component of a nested-name-specifier (either a DeclContext * or a Type *, bitmangled). The new sugar type QualifiedNameType composes a sequence of NestedNameSpecifiers with a representation of the type we're actually referring to. At present, we only build QualifiedNameType nodes within Sema::getTypeName. This will be extended to other type-constructing actions (e.g., ActOnClassTemplateId). Also on the way: QualifiedDeclRefExprs will also store a sequence of NestedNameSpecifiers, so that we can print out the property nested-name-specifier. I expect to also use this for handling dependent names like Fibonacci<I - 1>::value. llvm-svn: 67265
-
- Mar 18, 2009
-
-
Douglas Gregor authored
Type pointer. This allows our nested-name-specifiers to retain more information about the actual spelling (e.g., which typedef did the user name, or what exact template arguments were used in the template-id?). It will also allow us to have dependent nested-name-specifiers that don't map to any DeclContext. llvm-svn: 67140
-
Chris Lattner authored
no functionality change. llvm-svn: 67128
-
- Mar 17, 2009
-
-
Douglas Gregor authored
quite as great as it sounds, because, while we can refer to the enumerator values outside the template, e.g., adder<long, 3, 4>::value we can't yet refer to them with dependent names, so no Fibonacci (yet). InstantiateClassTemplateSpecialization is getting messy; next commit will put it into a less-ugly state. llvm-svn: 67092
-
- Mar 16, 2009
-
-
Anders Carlsson authored
llvm-svn: 67045
-
- Mar 13, 2009
-
-
Steve Naroff authored
Remove ActiveScope (revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65694 and http://llvm.org/viewvc/llvm-project?view=rev&revision=66741). Will replace with something better today... llvm-svn: 66893
-
- Mar 12, 2009
-
-
Douglas Gregor authored
llvm-svn: 66835
-
Ted Kremenek authored
be CompoundStmts. I think this is a valid assumption, and felt that the API should reflect it. Others please validate this assumption to make sure I didn't break anything. llvm-svn: 66814
-
Douglas Gregor authored
class members to the corresponding in-class declaration. Diagnose the erroneous use of 'static' on out-of-line definitions of class members. llvm-svn: 66740
-
Douglas Gregor authored
Move most of the checking from ActOnCXXMemberDeclarator to other, more general routines. This is a step toward separating the checking logic from Declarators, which in turn is required for template instantiation. llvm-svn: 66734
-
- Mar 11, 2009
-
-
Douglas Gregor authored
Make sure that we set the access specifier for an instantiated FieldDecl, and that the aggregate and POD flags for an instantiated class template are updated based on instantiation of a FieldDecl llvm-svn: 66701
-
Douglas Gregor authored
llvm-svn: 66696
-
Douglas Gregor authored
for FieldDecls so that the parser and the template instantiation make use of the same semantic checking module. llvm-svn: 66685
-
Douglas Gregor authored
template. More importantly, start to sort out the issues regarding complete types and nested-name-specifiers, especially the question of: when do we instantiate a class template specialization that occurs to the left of a '::' in a nested-name-specifier? llvm-svn: 66662
-
Douglas Gregor authored
translation unit. Thread the various declarations of variables via VarDecl::getPreviousDeclaration. llvm-svn: 66601
-
- Mar 10, 2009
-
-
Douglas Gregor authored
definitions. We were rejecting tentative definitions of incomplete (which is bad), and now we don't. This fix is partial because we don't do the end-of-translation-unit initialization for tentative definitions that don't ever have any initializers specified. llvm-svn: 66584
-
Anders Carlsson authored
llvm-svn: 66549
-
- Mar 09, 2009
-
-
Douglas Gregor authored
Rename DiagnoseIncompleteType to RequireCompleteType, and update the documentation to reflect the fact that we can instantiate templates here llvm-svn: 66421
-
- Mar 07, 2009
-
-
Douglas Gregor authored
struct to an extension warning to match the behavior of GNU C, which addresses the Sema part of PR3671. llvm-svn: 66308
-
Douglas Gregor authored
Use the 'declaration does not declare anything' error when we see an anonymous struct/union declaration outside of a struct or union in C llvm-svn: 66303
-
- Mar 06, 2009
-
-
Douglas Gregor authored
prototype of the same function, where the promoted parameter types in the K&R definition are not compatible with the types in the prototype. Fixes PR2821. llvm-svn: 66301
-
Douglas Gregor authored
llvm-svn: 66286
-
Douglas Gregor authored
C and C++. Fixes PR3688. llvm-svn: 66282
-
Chris Lattner authored
llvm-svn: 66213
-
- Mar 05, 2009
-
-
Chris Lattner authored
more consistently. llvm-svn: 66210
-
Chris Lattner authored
like: Stack dump: 0. t.c:5:10: in compound statement ('{}') 1. t.c:3:12: in compound statement ('{}') 2. t.c:3:12: parsing function body 'foo' 3. clang t.c Abort llvm-svn: 66118
-
- Mar 04, 2009
-
-
Eli Friedman authored
llvm-svn: 66027
-
Chris Lattner authored
decls. This reduces the number of calls to malloc on cocoa.h with pth and -disable-free from 15958 to 12444 times (down ~3500). llvm-svn: 66023
-
Chris Lattner authored
this, make DeclBase::Destroy destroy attributes instead of the DeclBase dtor. llvm-svn: 66020
-
- Mar 03, 2009
-
-
Douglas Gregor authored
response to attempts to diagnose an "incomplete" type. This will force us to use DiagnoseIncompleteType more regularly (rather than looking at isIncompleteType), but that's also a good thing. Implicit instantiation is still very simplistic, and will create a new definition for the class template specialization (as it should) but it only actually instantiates the base classes and attaches those. Actually instantiating class members will follow. Also, instantiate the types of non-type template parameters before checking them, allowing, e.g., template<typename T, T Value> struct Constant; to work properly. llvm-svn: 65924
-
- Mar 02, 2009
-
-
Douglas Gregor authored
need them to evaluate redeclarations or call a function that hasn't already been declared. We now keep a DenseMap of these locally-scoped declarations so that they are not visible but can be quickly found, e.g., when we're looking for previous declarations or before we go ahead and implicitly declare a function that's being called. Fixes PR3672. llvm-svn: 65792
-
- Mar 01, 2009
-
-
Anders Carlsson authored
llvm-svn: 65737
-
- Feb 28, 2009
-
-
Anders Carlsson authored
Fix invalid VLAs/VMs in Sema::ActOnVariableDeclarator, so that the variable will have the right type by the time the initializer is checked. This ensures that code like int a[(int)(1.0 / 1.0) = { 1 } will work. Eli, please review. llvm-svn: 65725
-