| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
completions. Plus, tweak a few completion patterns to better reflect
the language grammar.
llvm-svn: 104905
|
|
|
|
|
|
|
|
|
|
|
| |
1) Suppress diagnostics as soon as we form the code-completion
token, so we don't get any error/warning spew from the early
end-of-file.
2) If we consume a code-completion token when we weren't expecting
one, go into a code-completion recovery path that produces the best
results it can based on the context that the parser is in.
llvm-svn: 104585
|
|
|
|
|
|
| |
<rdar://problem/7971948>.
llvm-svn: 104291
|
|
|
|
| |
llvm-svn: 103198
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if/switch/while/do/for statements. Previously, we would end up either:
(1) Forgetting to destroy temporaries created in the condition (!),
(2) Destroying the temporaries created in the condition *before*
converting the condition to a boolean value (or, in the case of a
switch statement, to an integral or enumeral value), or
(3) In a for statement, destroying the condition's temporaries at
the end of the increment expression (!).
We now destroy temporaries in conditions at the right times. This
required some tweaking of the Parse/Sema interaction, since the parser
was building full expressions too early in many places.
Fixes PR7067.
llvm-svn: 103187
|
|
|
|
|
|
| |
fields to two 16-bit values instead of using bitfields.
llvm-svn: 101020
|
|
|
|
|
|
| |
returned by SetTypeSpecType.
llvm-svn: 100443
|
|
|
|
| |
llvm-svn: 99972
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
we would just leak them all over the place, with no clear ownership of
these objects at all. AttributeList objects would get leaked on both
error and non-error paths.
Note: I introduced the usage of llvm::OwningPtr<AttributeList> to
manage these objects, which is particularly useful for methods with
multiple return sites. In at least one method I used them even when
they weren't strictly necessary because it clarified the ownership
semantics and made the code easier to read. Should the excessive
'take()' and 'reset()' calls become a performance issue we can always
re-evaluate.
Note+1: I believe I have not introduced any double-frees, but it would
be nice for someone to review this.
This fixes <rdar://problem/7635046>.
llvm-svn: 95847
|
|
|
|
| |
llvm-svn: 94925
|
|
|
|
|
|
| |
unbalanced.
llvm-svn: 94347
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C++ grammatical constructs that show up in top-level (namespace-level)
declarations, member declarations, template declarations, statements,
expressions, conditions, etc. For example, we now provide a pattern
for
static_cast<type>(expr)
when we can have an expression, or
using namespace identifier;
when we can have a using directive.
Also, improves the results of code completion at the beginning of a
top-level declaration. Previously, we would see value names (function
names, global variables, etc.); now we see types, namespace names,
etc., but no values.
llvm-svn: 93134
|
|
|
|
| |
llvm-svn: 92526
|
|
|
|
| |
llvm-svn: 91802
|
|
|
|
|
|
| |
pull ':' eating out of ParseAsmOperandsOpt.
llvm-svn: 91801
|
|
|
|
|
|
| |
Action::FullExpr to Action::MakeFullExpr to avoid name clashes.
llvm-svn: 91494
|
|
|
|
| |
llvm-svn: 91079
|
|
|
|
| |
llvm-svn: 91016
|
|
|
|
| |
llvm-svn: 91008
|
|
|
|
|
|
|
| |
still parse the body of the switch to try to avoid spurious
diagnostics. Fixes PR5606.
llvm-svn: 89847
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All statements that involve conditions can now hold on to a separate
condition declaration (a VarDecl), and will use a DeclRefExpr
referring to that VarDecl for the condition expression. ForStmts now
have such a VarDecl (I'd missed those in previous commits).
Also, since this change reworks the Action interface for
if/while/switch/for, use FullExprArg for the full expressions in those
expressions, to ensure that we're emitting
Note that we are (still) not generating the right cleanups for
condition variables in for statements. That will be a follow-on
commit.
llvm-svn: 89817
|
|
|
|
| |
llvm-svn: 89801
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following attributes are currently supported in C++0x attribute
lists (and in GNU ones as well):
- align() - semantics believed to be conformant to n3000, except for
redeclarations and what entities it may apply to
- final - semantics believed to be conformant to CWG issue 817's proposed
wording, except for redeclarations
- noreturn - semantics believed to be conformant to n3000, except for
redeclarations
- carries_dependency - currently ignored (this is an optimization hint)
llvm-svn: 89543
|
|
|
|
|
|
| |
(radar 7409165).
llvm-svn: 89400
|
|
|
|
|
|
|
| |
declarators are parsed primarily within a single function (at least for
these cases). Remove some excess diagnostics arising during parse failures.
llvm-svn: 85924
|
|
|
|
|
|
| |
are updated.
llvm-svn: 84447
|
|
|
|
|
|
|
|
|
| |
- strcmp -> ==
- OS.write(II->getName() ...) -> OS << II->getNameStr()
- Avoid std::string concatenation
- Use getNameStr().str() when an std::string is really needed.
llvm-svn: 84437
|
|
|
|
|
|
| |
expression, or statement
llvm-svn: 82481
|
|
|
|
|
|
| |
of enumeration type, providing the various unused enumerators as options.
llvm-svn: 82467
|
|
|
|
| |
llvm-svn: 81346
|
|
|
|
|
|
| |
the return expr inside a CXXExprWithTemporaries if needed.
llvm-svn: 79342
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ExpectAndConsume instead of custom diag logic. This gets us an
insertion hint and positions the ; at the end of the line
instead of on the next token. Before:
t.c:5:1: error: expected ';' after return statement
}
^
after:
t.c:4:11: error: expected ';' after return statement
return 4
^
;
llvm-svn: 73315
|
|
|
|
|
|
| |
diagnostics in some cases.
llvm-svn: 73314
|
|
|
|
|
|
| |
This fixes a source range problem reported by Olaf Krzikalla.
llvm-svn: 73266
|
|
|
|
| |
llvm-svn: 72834
|
|
|
|
| |
llvm-svn: 72641
|
|
|
|
|
|
|
|
| |
redundant functionality. The result (ASTOwningVector) lives in
clang/Parse/Ownership.h and is used by both the parser and semantic
analysis. No intended functionality change.
llvm-svn: 72214
|
|
|
|
| |
llvm-svn: 72210
|
|
|
|
| |
llvm-svn: 71990
|
|
|
|
| |
llvm-svn: 71989
|
|
|
|
| |
llvm-svn: 71982
|
|
|
|
|
|
|
| |
narrower, so it doesn't catch expresions that aren't sub-expressions of
__extension__ operator.
llvm-svn: 71967
|
|
|
|
| |
llvm-svn: 70673
|
|
|
|
|
|
|
|
|
|
|
|
| |
that if we're going to print an extension warning anyway,
there's no point to changing behavior based on NoExtensions: it will
only make error recovery worse.
Note that this doesn't cause any behavior change because NoExtensions
isn't used by the current front-end. I'm still considering what to do about
the remaining use of NoExtensions in IdentifierTable.cpp.
llvm-svn: 70273
|
|
|
|
| |
llvm-svn: 70160
|
|
|
|
|
|
| |
can't track down.
llvm-svn: 70155
|
|
|
|
|
|
|
|
|
|
|
|
| |
for scoping to match C99 even when in C89 mode. This patch fixes this
(eliminating a "redefinition of thisKey" error), and also prevents non-sensical
diagnostics in -pedantic mode like this:
t.m:7:8: warning: variable declaration in for loop is a C99-specific feature
for (id thisKey in keys) ;
^
llvm-svn: 69760
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the range is now the ';' location. For something like this:
$ cat t2.c
#define bool int
void f(int x, int y) {
bool b = !x && y;
}
We used to produce:
$ clang-cc t2.c -ast-dump
typedef char *__builtin_va_list;
void f(int x, int y)
(CompoundStmt 0x2201f10 <t2.c:3:22, line:5:1>
(DeclStmt 0x2201ef0 <line:2:14> <----
0x2201a20 "int b =
(BinaryOperator 0x2201ed0 <line:4:10, col:16> 'int' '&&'
(UnaryOperator 0x2201e90 <col:10, col:11> 'int' prefix '!'
(DeclRefExpr 0x2201c90 <col:11> 'int' ParmVar='x' 0x2201a50))
(DeclRefExpr 0x2201eb0 <col:16> 'int' ParmVar='y' 0x2201e10))")
Now we produce:
$ clang-cc t2.c -ast-dump
typedef char *__builtin_va_list;
void f(int x, int y)
(CompoundStmt 0x2201f10 <t2.c:3:22, line:5:1>
(DeclStmt 0x2201ef0 <line:2:14, line:4:17> <------
0x2201a20 "int b =
(BinaryOperator 0x2201ed0 <col:10, col:16> 'int' '&&'
(UnaryOperator 0x2201e90 <col:10, col:11> 'int' prefix '!'
(DeclRefExpr 0x2201c90 <col:11> 'int' ParmVar='x' 0x2201a50))
(DeclRefExpr 0x2201eb0 <col:16> 'int' ParmVar='y' 0x2201e10))")
llvm-svn: 68288
|
|
|
|
| |
llvm-svn: 68011
|
|
|
|
|
|
|
|
| |
processing
into ParseForStatement. Merge two tests into one.
llvm-svn: 68010
|