| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
vector<vector<double>> Matrix;
In C++98/03, this token always means "right shift". However, if we're in
a context where we know that it can't mean "right shift", provide a
friendly reminder to put a space between the two >'s and then treat it
as two >'s as part of recovery.
In C++0x, this token is always broken into two '>' tokens.
llvm-svn: 65484
|
|
|
|
| |
llvm-svn: 64961
|
|
|
|
|
|
|
|
| |
us whether there was an error in trying to parse a type-name (type-id
in C++). This allows propagation of errors further in the compiler,
suppressing more bogus error messages.
llvm-svn: 64922
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
any named parameters, e.g., this is accepted in C:
void f(...) __attribute__((overloadable));
although this would be rejected:
void f(...);
To do this, moved the checking of the "ellipsis without any named
arguments" condition from the parser into Sema (where it belongs anyway).
llvm-svn: 64902
|
|
|
|
|
|
| |
operator/delimiter. Also, clean up after ourselves following a failed parse of a template-argument-list
llvm-svn: 64166
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to a class template. For example, the template-id 'vector<int>' now
has a nice, sugary type in the type system. What we can do now:
- Parse template-ids like 'vector<int>' (where 'vector' names a
class template) and form proper types for them in the type system.
- Parse icky template-ids like 'A<5>' and 'A<(5 > 0)>' properly,
using (sadly) a bool in the parser to tell it whether '>' should
be treated as an operator or not.
This is a baby-step, with major problems and limitations:
- There are currently two ways that we handle template arguments
(whether they are types or expressions). These will be merged, and,
most likely, TemplateArg will disappear.
- We don't have any notion of the declaration of class template
specializations or of template instantiations, so all template-ids
are fancy names for 'int' :)
llvm-svn: 64153
|
|
|
|
| |
llvm-svn: 64151
|
|
|
|
| |
llvm-svn: 63983
|
|
|
|
|
|
|
|
| |
This shrinks OwningResult by one pointer. Since it is no longer larger than OwningPtr, merge the two.
This leads to simpler client code and speeds up my benchmark by 2.7%.
For some reason, this exposes a previously hidden bug, causing a regression in SemaCXX/condition.cpp.
llvm-svn: 63867
|
|
|
|
| |
llvm-svn: 63784
|
|
|
|
|
|
| |
Pointers to functions don't work yet, and pointers to overloaded functions even less. Also, far too much illegal code is accepted.
llvm-svn: 63655
|
|
|
|
| |
llvm-svn: 63573
|
|
|
|
|
|
| |
__extension__. This sort of construct shows up in the gcc source code.
llvm-svn: 63100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function DeclaratorChunk in common cases. This uses a fixed array in
Declarator when it is small enough for the first function declarator chunk
in a declarator.
This eliminates all malloc/free traffic from DeclaratorChunk::getFunction
when running on Cocoa.h except for five functions: signal/bsd_signal/sigset,
which have multiple Function DeclChunk's, and
CFUUIDCreateWithBytes/CFUUIDGetConstantUUIDWithBytes, which take more than
16 arguments.
This patch was pair programmed with Steve.
llvm-svn: 62599
|
|
|
|
| |
llvm-svn: 62537
|
|
|
|
|
|
| |
Fix type of logical negation for C++.
llvm-svn: 62475
|
|
|
|
|
|
| |
These actions are extremely widely used (identifier expressions and literals); still no performance regression.
llvm-svn: 62468
|
|
|
|
|
|
| |
explicit return type on block literals.
llvm-svn: 62240
|
|
|
|
|
|
| |
shorter and more accurate. The type name might not be qualified.
llvm-svn: 61788
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make C++ classes track the POD property (C++ [class]p4)
Track the existence of a copy assignment operator.
Implicitly declare the copy assignment operator if none is provided.
Implement most of the parsing job for the G++ type traits extension.
Fully implement the low-hanging fruit of the type traits:
__is_pod: Whether a type is a POD.
__is_class: Whether a type is a (non-union) class.
__is_union: Whether a type is a union.
__is_enum: Whether a type is an enum.
__is_polymorphic: Whether a type is polymorphic (C++ [class.virtual]p1).
llvm-svn: 61746
|
|
|
|
|
|
| |
isn't worth the complexity and the code already does a ton of lookahead.
llvm-svn: 61671
|
|
|
|
|
|
|
| |
only be called when they might be needed now, so make them assert
that their current token is :: or identifier.
llvm-svn: 61662
|
|
|
|
| |
llvm-svn: 61654
|
|
|
|
|
|
|
| |
sure to pass it down. This makes the code a bit gross, I will clean
it up in subsequent commits.
llvm-svn: 61650
|
|
|
|
|
|
|
|
| |
ParseCastExpression into the switch. This gets it out of the hot
path through ParseCastExpression for all the non-identifier and
non-:: tokens.
llvm-svn: 61643
|
|
|
|
| |
llvm-svn: 61641
|
|
|
|
| |
llvm-svn: 61638
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DeclContext. Instead, just keep the list of currently-active
declarations and only build the OverloadedFunctionDecl when we
absolutely need it.
This is a half-step toward eliminating the need to explicitly build
OverloadedFunctionDecls that store sets of overloaded
functions. This was suggested by Argiris a while back, and it's a good
thing for several reasons: first, it eliminates the messy logic that
currently tries to keep the OverloadedFunctionDecl in sync with the
declarations that are being added. Second, it will (eventually)
eliminate the need to allocate memory for overload sets, which could
help performance. Finally, it helps set us up for when name lookup can
return multiple (possibly ambiguous) results, as can happen with
lookup of class members in C++.
Next steps: make the IdentifierResolver store overloads as separate
entries in its list rather than replacing them with an
OverloadedFunctionDecl now, then see how far we can go toward
eliminating OverloadedFunctionDecl entirely.
llvm-svn: 61357
|
|
|
|
|
|
| |
connection.
llvm-svn: 60982
|
|
|
|
| |
llvm-svn: 60961
|
|
|
|
| |
llvm-svn: 60928
|
|
|
|
| |
llvm-svn: 60906
|
|
|
|
| |
llvm-svn: 60904
|
|
|
|
| |
llvm-svn: 60900
|
|
|
|
| |
llvm-svn: 60888
|
|
|
|
|
|
| |
explicitly calling EnterScope/ExitScope
llvm-svn: 60830
|
|
|
|
|
|
| |
Hinnant. Makes for much nicer syntax when smart pointers are used consistently. Also, start converting internal argument passing of Parser to smart pointers.
llvm-svn: 60809
|
|
|
|
| |
llvm-svn: 60791
|
|
|
|
|
|
| |
variables.
llvm-svn: 60761
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
template<typename T> void f(T x) {
g(x); // g is a dependent name, so don't even bother to look it up
g(); // error: g is not a dependent name
}
Note that when we see "g(", we build a CXXDependentNameExpr. However,
if none of the call arguments are type-dependent, we will force the
resolution of the name "g" and replace the CXXDependentNameExpr with
its result.
GCC actually produces a nice error message when you make this
mistake, and even offers to compile your code with -fpermissive. I'll
do the former next, but I don't plan to do the latter.
llvm-svn: 60618
|
|
|
|
| |
llvm-svn: 60423
|
|
|
|
| |
llvm-svn: 60421
|
|
|
|
| |
llvm-svn: 60235
|
|
|
|
| |
llvm-svn: 60119
|
|
|
|
|
|
| |
AST nodes in the parser in most cases, even on error.
llvm-svn: 60057
|
|
|
|
| |
llvm-svn: 59921
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with implicit quotes around them. This has a bunch of follow-on
effects and requires tweaking to a whole lot of code. This causes
a regression in two tests (xfailed) by causing it to emit things like:
Line 10: duplicate interface declaration for category 'MyClass1' ('Category1')
instead of:
Line 10: duplicate interface declaration for category 'MyClass1(Category1)'
I will fix this in a follow-up commit.
As part of this, I had to start switching stuff to use ->getDeclName() instead
of Decl::getName() for consistency. This is good, but I was planning to do this
as an independent patch. There will be several follow-on patches
to clean up some of the mess, but this patch is already too big.
llvm-svn: 59917
|
|
|
|
|
|
| |
This version uses VLAs to represent arrays. I'll try an alternative way next, but I want this safe first.
llvm-svn: 59835
|
|
|
|
|
|
|
|
|
| |
built-in operator candidates. Test overloading of '&' and ','.
In C++, a comma expression is an lvalue if its right-hand
subexpression is an lvalue. Update Expr::isLvalue accordingly.
llvm-svn: 59643
|
|
|
|
|
|
| |
The core fix in Sema::ActOnClassMessage(). All the other changes have to do with passing down the SourceLocation for the receiver (to properly position the cursor when producing an error diagnostic).
llvm-svn: 59639
|