| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
parser. For example, we now print out:
0. t.c:5:10: in compound statement {}
1. t.c:3:12: in compound statement {}
2. clang t.c -fsyntax-only
llvm-svn: 66108
|
|
|
|
| |
llvm-svn: 66044
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
__extension__. This sort of construct shows up in the gcc source code.
llvm-svn: 63100
|
|
|
|
|
|
| |
Fix type of logical negation for C++.
llvm-svn: 62475
|
|
|
|
|
|
| |
misleading (and shorter).
llvm-svn: 62466
|
|
|
|
| |
llvm-svn: 62464
|
|
|
|
| |
llvm-svn: 62463
|
|
|
|
|
|
| |
Fix a type error; parser wanted to pass the third part of a for-statement as a statement; should be expression.
llvm-svn: 62380
|
|
|
|
|
|
| |
"logical" location, refer to the "instantiation" location.
llvm-svn: 62316
|
|
|
|
|
|
|
| |
No performance regression in my basic test.
Also fixed a type error in ActOnFinishSwitchStmt's arguments (body is a stmt).
llvm-svn: 62032
|
|
|
|
| |
llvm-svn: 61456
|
|
|
|
| |
llvm-svn: 61337
|
|
|
|
| |
llvm-svn: 61312
|
|
|
|
| |
llvm-svn: 61309
|
|
|
|
| |
llvm-svn: 61160
|
|
|
|
|
|
| |
Convert a few functions.
llvm-svn: 60983
|
|
|
|
| |
llvm-svn: 60933
|
|
|
|
| |
llvm-svn: 60932
|
|
|
|
|
|
|
|
|
|
| |
Substantially improve error recovery after broken if conditions by
parsing the full if when we have a semantic error instead of using
parser recovery techniques to recover from a semantic error.
This fixes rdar://6094870 - spurious error after invalid 'if' condition
llvm-svn: 60929
|
|
|
|
| |
llvm-svn: 60904
|
|
|
|
| |
llvm-svn: 60900
|
|
|
|
| |
llvm-svn: 60895
|
|
|
|
| |
llvm-svn: 60892
|
|
|
|
| |
llvm-svn: 60888
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"else" clause, e.g.,
if (int X = foo()) {
} else {
if (X) { // warning: X is always zero in this context
}
}
Fixes rdar://6425550 and lets me think about something other than
DeclContext.
llvm-svn: 60858
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
AST nodes in the parser in most cases, even on error.
llvm-svn: 60057
|
|
|
|
| |
llvm-svn: 59921
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
post-decrement, including support for generating all of the built-in
operator candidates for these operators.
C++ and C have different rules for the arguments to the builtin unary
'+' and '-'. Implemented both variants in Sema::ActOnUnaryOp.
In C++, pre-increment and pre-decrement return lvalues. Update
Expr::isLvalue accordingly.
llvm-svn: 59638
|
|
|
|
|
|
|
|
|
| |
and let the clients push whatever they want into the DiagnosticInfo
instead of hard coding a few forms. Also switch various clients to
use Diag(Tok, ...) instead of Diag(Tok.getLocation(), ...) as the
canonical form to simplify the code a bit.
llvm-svn: 59509
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. In the top level of ParseStatementOrDeclaration, don't eat a } if we
just parsed a statement if it list there. Also, don't even bother
emitting an error about a missing semicolon if the statement had a
bug (an rbrace is fine).
2. In do/while parsing, don't require a 'while' to be present if the do
body didn't parse.
This allows us to generate a clean diagnostic for this code:
t.c:1:22: error: expected expression
void foo (void) { do . while (0); }
^
Thanks to Neil for pointing this out.
llvm-svn: 59256
|
|
|
|
| |
llvm-svn: 57807
|
|
|
|
|
|
| |
'for-init-statement' part of a 'for' statement.
llvm-svn: 57112
|
|
|
|
|
|
| |
'ParseTentative.cpp' implements the functionality needed to resolve ambiguous C++ statements, to either a declaration or an expression, by "tentatively parsing" them.
llvm-svn: 57084
|
|
|
|
|
|
| |
declaration should be local to an if/switch/while/for statement.
llvm-svn: 56134
|
|
|
|
| |
llvm-svn: 56095
|
|
|
|
| |
llvm-svn: 56090
|
|
|
|
|
|
|
|
| |
-Scoping in C99 works good for C++ too, remove the C++-specific comments.
If someone thinks that the C++-specific comments are necessary for clarification, let me know and I'll put them back on.
llvm-svn: 56078
|
|
|
|
| |
llvm-svn: 56060
|
|
|
|
|
|
|
|
| |
selection-statements and iteration-statements (if/switch/while/for).
Add new 'ActOnCXXConditionDeclarationExpr' action, called when the 'condition' is a declaration instead of an expression.
llvm-svn: 56007
|
|
|
|
| |
llvm-svn: 55888
|
|
|
|
|
|
| |
Simplify the parser by removing Parser::ParseIdentifierStatement.
llvm-svn: 53520
|
|
|
|
|
|
|
|
|
| |
(by Preprocessor::LookNext):
-Remove ParseExpressionWithLeadingIdentifier and ParseAssignmentExprWithLeadingIdentifier.
-Separate ParseLabeledStatement from ParseIdentifierStatement.
llvm-svn: 53376
|
|
|
|
| |
llvm-svn: 49349
|
|
lib dir and move all the libraries into it. This follows the main
llvm tree, and allows the libraries to be built in parallel. The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in. This speeds
up parallel builds, particularly incremental ones.
llvm-svn: 48402
|