- May 29, 2009
-
-
Douglas Gregor authored
printing logic to help customize the output. For now, we use this rather than a special flag to suppress the "struct" when printing "struct X" and to print the Boolean type as "bool" in C++ but "_Bool" in C. llvm-svn: 72590
-
Eli Friedman authored
hadError (suppressing future diagnostics) if we didn't print an error. llvm-svn: 72588
-
Eli Friedman authored
VLAs. llvm-svn: 72587
-
Eli Friedman authored
actually necessary in some obscure cases. llvm-svn: 72585
-
Mike Stump authored
tried other things that might trip, but they all worked. llvm-svn: 72584
-
Eli Friedman authored
llvm-svn: 72583
-
Douglas Gregor authored
template instantiation. This helps reduce our stack footprint when performing deep template instantiations. llvm-svn: 72582
-
Eli Friedman authored
handle the construct in question correctly. llvm-svn: 72581
-
Sebastian Redl authored
llvm-svn: 72580
-
Mike Stump authored
llvm-svn: 72578
-
Sebastian Redl authored
llvm-svn: 72576
-
Mike Stump authored
a vla is used. llvm-svn: 72575
-
Mike Stump authored
llvm-svn: 72574
-
Mike Stump authored
llvm-svn: 72573
-
Mike Stump authored
any body can spot codegen bugs with volatile, or knows of any in the bug database, let me know. llvm-svn: 72572
-
Sebastian Redl authored
llvm-svn: 72571
-
Douglas Gregor authored
llvm-svn: 72570
-
Douglas Gregor authored
llvm-svn: 72569
-
Douglas Gregor authored
instantiation of tags local to member functions of class templates (and, eventually, function templates) works when the tag is defined as part of the decl-specifier-seq, e.g., struct S { T x, y; } s1; Also, make sure that we don't try to default-initialize a dependent type. llvm-svn: 72568
-
Eli Friedman authored
to the DeclGroup. llvm-svn: 72559
-
Douglas Gregor authored
specifier resulted in the creation of a new TagDecl node, which happens either when the tag specifier was a definition or when the tag specifier was the first declaration of that tag type. This information has several uses, the first of which is implemented in this commit: 1) In C++, one is not allowed to define tag types within a type specifier (e.g., static_cast<struct S { int x; } *>(0) is ill-formed) or within the result or parameter types of a function. We now diagnose this. 2) We can extend DeclGroups to contain information about any tags that are declared/defined within the declaration specifiers of a variable, e.g., struct Point { int x, y, z; } p; This will help improve AST printing and template instantiation, among other things. 3) For C99, we can keep track of whether a tag type is defined within the type of a parameter, to properly cope with cases like, e.g., int bar(struct T2 { int x; } y) { struct T2 z; } We can also do similar things wherever there is a type specifier, e.g., to keep track of where the definition of S occurs in this legal C99 code: (struct S { int x, y; } *)0 llvm-svn: 72555
-
Eli Friedman authored
getUnqualifiedType() doesn't strip off all qualifiers for non-canonical types. llvm-svn: 72552
-
- May 28, 2009
-
-
Eli Friedman authored
llvm-svn: 72538
-
Douglas Gregor authored
llvm-svn: 72528
-
Daniel Dunbar authored
clang -> clang-cc to be less confusing. llvm-svn: 72527
-
Douglas Gregor authored
given DeclContext is dependent on type parameters. Use this to properly determine whether a TagDecl is dependent; previously, we were missing the case where the TagDecl is a local class of a member function of a class template (phew!). Also, make sure that, when we instantiate declarations within a member function of a class template (or a function template, eventually), that we add those declarations to the "instantiated locals" map so that they can be found when instantiating declaration references. Unfortunately, I was not able to write a useful test for this change, although the assert() that fires when uncommenting the FIXME'd line in test/SemaTemplate/instantiate-declref.cpp tells the "experienced user" that we're now doing the right thing. llvm-svn: 72526
-
Chris Lattner authored
llvm-svn: 72520
-
Chris Lattner authored
diagnostic to include the full instantiation location for the invalid paste. For: #define foo(a, b) a ## b #define bar(x) foo(x, ]) bar(a) bar(zdy) Instead of: t.c:3:22: error: pasting formed 'a]', an invalid preprocessing token #define foo(a, b) a ## b ^ t.c:3:22: error: pasting formed 'zdy]', an invalid preprocessing token we now produce: t.c:7:1: error: pasting formed 'a]', an invalid preprocessing token bar(a) ^ t.c:4:16: note: instantiated from: #define bar(x) foo(x, ]) ^ t.c:3:22: note: instantiated from: #define foo(a, b) a ## b ^ t.c:8:1: error: pasting formed 'zdy]', an invalid preprocessing token bar(zdy) ^ t.c:4:16: note: instantiated from: #define bar(x) foo(x, ]) ^ t.c:3:22: note: instantiated from: #define foo(a, b) a ## b ^ llvm-svn: 72519
-
Mike Stump authored
llvm-svn: 72506
-
Daniel Dunbar authored
llvm-svn: 72504
-
Douglas Gregor authored
llvm-svn: 72503
-
Douglas Gregor authored
parser. Rather than placing all of the delayed member function declarations and inline definitions into a single bucket corresponding to the top-level class, we instead mirror the nesting structure of the nested classes and place the delayed member functions into their appropriate place. Then, when we actually parse the delayed member function declarations, set up the scope stack the same way as it was when we originally saw the declaration, so that we can find, e.g., template parameters that are in scope. llvm-svn: 72502
-
Eli Friedman authored
section. llvm-svn: 72501
-
Eli Friedman authored
reflect that. llvm-svn: 72500
-
Eli Friedman authored
behavior is more likely to be confusing than useful. llvm-svn: 72499
-
Sebastian Redl authored
Reintroduce the home for exception specs, and make Sema fill it. However, keep the spec out of the canonical type this time. Net effect is currently nothing, because the spec isn't checked anywhere. llvm-svn: 72498
-
Eli Friedman authored
llvm-svn: 72497
-
- May 27, 2009
-
-
Fariborz Jahanian authored
llvm-svn: 72492
-
Fariborz Jahanian authored
llvm-svn: 72491
-
Sebastian Redl authored
Add a big test case for I-C-Es in C++, and a fix to make it work. The fix might not be the right way to do it. llvm-svn: 72490
-