- Mar 17, 2009
-
-
Douglas Gregor authored
diagnostics. This builds on the patch that Sebastian committed and then revert. Major differences are: - We don't remove or use the current ".def" files. Instead, for now, we just make sure that we're building the ".inc" files. - Fixed CMake makefiles to run TableGen and build the ".inc" files when needed. Tested with both the Xcode and Makefile generators provided by CMake, so it should be solid. - Fixed normal makefiles to handle out-of-source builds that involve the ".inc" files. I'll send a separate patch to the list with Sebastian's changes that eliminate the use of the .def files. llvm-svn: 67058
-
- Mar 15, 2009
-
-
Anders Carlsson authored
Add the ability to clone integer and string literals. Use it when instantiating template expressions. llvm-svn: 67030
-
- Mar 14, 2009
-
-
Anders Carlsson authored
llvm-svn: 66997
-
Ted Kremenek authored
internal implementation of Selector. llvm-svn: 66996
-
Anders Carlsson authored
More static_assert work. Check that the assert expr is valid and show an error if it's false. Create the declaration and add it to the current context. llvm-svn: 66995
-
Douglas Gregor authored
always, refactored the existing logic to tease apart the parser action and the semantic analysis shared by the parser and template instantiation. llvm-svn: 66987
-
Ted Kremenek authored
llvm-svn: 66979
-
- Mar 13, 2009
-
-
Chris Lattner authored
etc and make freestanding imply it. llvm-svn: 66972
-
Douglas Gregor authored
- C++ function casts, e.g., T(foo) - sizeof(), alignof() More importantly, this allows us to verify that we're performing overload resolution during template instantiation, with argument-dependent lookup and the "cached" results of name lookup from the template definition. llvm-svn: 66947
-
Douglas Gregor authored
instantiation for binary operators. This change moves most of the operator-overloading code from the parser action ActOnBinOp to a new, parser-independent semantic checking routine CreateOverloadedBinOp. Of particular importance is the fact that CreateOverloadedBinOp does *not* perform any name lookup based on the current parsing context (it doesn't take a Scope*), since it has to be usable during template instantiation, when there is no scope information. Rather, it takes a pre-computed set of functions that are visible from the context or via argument-dependent lookup, and adds to that set any member operators and built-in operator candidates. The set of functions is computed in the parser action ActOnBinOp based on the current context (both operator name lookup and argument-dependent lookup). Within a template, the set computed by ActOnBinOp is saved within the type-dependent AST node and is augmented with the results of argument-dependent name lookup at instantiation time (see TemplateExprInstantiator::VisitCXXOperatorCallExpr). Sadly, we can't fully test this yet. I'll follow up with template instantiation for sizeof so that the real fun can begin. llvm-svn: 66923
-
Chris Lattner authored
llvm-svn: 66909
-
rdar://problem/6675489Steve Naroff authored
Also changed BlockDecl API to be more consistent (wrt FunctionDecl). llvm-svn: 66904
-
- Mar 12, 2009
-
-
Douglas Gregor authored
llvm-svn: 66837
-
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
-
Chris Lattner authored
llvm-svn: 66738
-
- Mar 11, 2009
-
-
Chris Lattner authored
llvm-svn: 66732
-
Douglas Gregor authored
llvm-svn: 66696
-
Ted Kremenek authored
not be consulted for its size expression when operator* was called in the StmtIterator (this resulted in an assertion failure). llvm-svn: 66679
-
Chris Lattner authored
llvm-svn: 66618
-
Chris Lattner authored
llvm-svn: 66614
-
Chris Lattner authored
Sema/asm.c:64:9: error: invalid % escape in inline assembly string asm("%!" : ); // expected-error {{invalid % escape in inline assembly string}} ~~^~ llvm-svn: 66606
-
Chris Lattner authored
llvm-svn: 66605
-
Douglas Gregor authored
translation unit. Thread the various declarations of variables via VarDecl::getPreviousDeclaration. llvm-svn: 66601
-
Chris Lattner authored
llvm-svn: 66598
-
Chris Lattner authored
code where Sema can get to it. No functionality change. llvm-svn: 66596
-
- Mar 10, 2009
-
-
Douglas Gregor authored
context of a template-id for which we need to instantiate default template arguments. In the TextDiagnosticPrinter, don't suppress the caret diagnostic if we are producing a non-note diagnostic that follows a note diagnostic with the same location, because notes are (conceptually) a part of the warning or error that comes before them. llvm-svn: 66572
-
Douglas Gregor authored
'struct A<double, int>' In the "template instantiation depth exceeded" message, print "-ftemplate-depth-N" rather than "-ftemplate-depth=N". An unnamed tag type that is declared with a typedef, e.g., typedef struct { int x, y; } Point; can be used as a template argument. Allow this, and check that we get sensible pretty-printing for such things. llvm-svn: 66560
-
Douglas Gregor authored
When pretty-printing an anonymous tag type that is associated with a typedef, use the name of the typedef rather than <anonymous> llvm-svn: 66559
-
Daniel Dunbar authored
llvm-svn: 66555
-
Chris Lattner authored
time handle + operands in operand counting, fixing asm.c:t7 to expand into $2 instead of $1. llvm-svn: 66531
-
Chris Lattner authored
llvm-svn: 66521
-
Douglas Gregor authored
such as replacing 'T' in vector<T>. There are a few aspects to this: - Extend TemplateArgument to allow arbitrary expressions (an Expr*), and switch ClassTemplateSpecializationType to store TemplateArguments rather than it's own type-or-expression representation. - ClassTemplateSpecializationType can now store dependent types. In that case, the canonical type is another ClassTemplateSpecializationType (with default template arguments expanded) rather than a declaration (we don't build Decls for dependent types). - Split ActOnClassTemplateId into ActOnClassTemplateId (called from the parser) and CheckClassTemplateId (called from ActOnClassTemplateId and InstantiateType). They're smart enough to handle dependent types, now. llvm-svn: 66509
-
- Mar 05, 2009
-
-
Fariborz Jahanian authored
for future use. llvm-svn: 66184
-
Chris Lattner authored
Introduce a new PrettyStackTraceDecl. Use it to add the top level LLVM IR generation stuff in Backend.cpp to stack traces. We now get crashes like: Stack dump: 0. Program arguments: clang t.c -emit-llvm 1. <eof> parser at end of file 2. t.c:1:5: LLVM IR generation of declaration 'a' Abort for IR generation crashes. llvm-svn: 66153
-
- Mar 04, 2009
-
-
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
-
Eli Friedman authored
chosen sub-expression, rather than just evaluating the condition. llvm-svn: 66018
-
Chris Lattner authored
multiple sequential case statements instead of doing it with recursion. This fixes a problem where we run out of stack space parsing 100K directly nested cases. There are a couple other problems that prevent this from being useful in practice (right now the example only parses correctly with -disable-free and doesn't work with -emit-llvm), but this is a start. I'm not including a testcase because it is large and uninteresting for regtesting. Sebastian, I would appreciate it if you could scrutinize the smart pointer gymnastics I do. llvm-svn: 66011
-
- Mar 03, 2009
-
-
rdar://problem/6640991Steve Naroff authored
Also necessary to fix: <rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements <rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements llvm-svn: 65964
-
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
-