| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Convert a few functions.
llvm-svn: 60983
|
| |
|
|
|
|
| |
connection.
llvm-svn: 60982
|
| |
|
|
| |
llvm-svn: 60961
|
| |
|
|
| |
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: 60928
|
| |
|
|
| |
llvm-svn: 60906
|
| |
|
|
| |
llvm-svn: 60904
|
| |
|
|
| |
llvm-svn: 60900
|
| |
|
|
| |
llvm-svn: 60895
|
| |
|
|
| |
llvm-svn: 60892
|
| |
|
|
| |
llvm-svn: 60888
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and separates lexical name lookup from qualified name lookup. In
particular:
* Make DeclContext the central data structure for storing and
looking up declarations within existing declarations, e.g., members
of structs/unions/classes, enumerators in C++0x enums, members of
C++ namespaces, and (later) members of Objective-C
interfaces/implementations. DeclContext uses a lazily-constructed
data structure optimized for fast lookup (array for small contexts,
hash table for larger contexts).
* Implement C++ qualified name lookup in terms of lookup into
DeclContext.
* Implement C++ unqualified name lookup in terms of
qualified+unqualified name lookup (since unqualified lookup is not
purely lexical in C++!)
* Limit the use of the chains of declarations stored in
IdentifierInfo to those names declared lexically.
* Eliminate CXXFieldDecl, collapsing its behavior into
FieldDecl. (FieldDecl is now a ScopedDecl).
* Make RecordDecl into a DeclContext and eliminates its
Members/NumMembers fields (since one can just iterate through the
DeclContext to get the fields).
llvm-svn: 60878
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"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
|
| |
|
|
|
|
| |
pointers.
llvm-svn: 60782
|
| |
|
|
|
|
| |
variables.
llvm-svn: 60761
|
| |
|
|
|
|
|
| |
This is important because ParseDeclarationOrFunctionDefinition
skips to, but does not consume, an } on error.
llvm-svn: 60719
|
| |
|
|
| |
llvm-svn: 60718
|
| |
|
|
| |
llvm-svn: 60686
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
parameters, with some semantic analysis:
- Template parameters are introduced into template parameter scope
- Complain about template parameter shadowing (except in Microsoft mode)
Note that we leak template parameter declarations like crazy, a
problem we'll remedy once we actually create proper declarations for
templates.
Next up: dependent types and value-dependent/type-dependent
expressions.
llvm-svn: 60597
|
| |
|
|
| |
llvm-svn: 60423
|
| |
|
|
| |
llvm-svn: 60421
|
| |
|
|
| |
llvm-svn: 60418
|
| |
|
|
| |
llvm-svn: 60413
|
| |
|
|
|
|
|
|
|
| |
- Template parameter scope to hold the template parameters
- Template parameter context for parsing declarators
- Actions for template type parameters and non-type template
parameters
llvm-svn: 60387
|
| |
|
|
| |
llvm-svn: 60384
|
| |
|
|
| |
llvm-svn: 60380
|
| |
|
|
| |
llvm-svn: 60359
|
| |
|
|
| |
llvm-svn: 60235
|
| |
|
|
| |
llvm-svn: 60124
|
| |
|
|
| |
llvm-svn: 60119
|
| |
|
|
|
|
|
|
| |
-Change Parser::ParseCXXScopeSpecifier to MaybeParseCXXScopeSpecifier
-Remove Parser::isTokenCXXScopeSpecifier and fold it into MaybeParseCXXScopeSpecifier
-Rename Parser::TryAnnotateScopeToken to TryAnnotateCXXScopeToken and only allow it to be called when in C++
llvm-svn: 60117
|
| |
|
|
|
|
|
|
| |
Implemented anonymous category (also know as continuation class)
used to override main class's property attribute. This is work in
propgress.
llvm-svn: 60114
|
| |
|
|
|
|
|
| |
- This improves -parse-noop of Carbon.h by +2%, and I believe
compensates for the majority of the performance regression in r58913.
llvm-svn: 60063
|
| |
|
|
|
|
| |
AST nodes in the parser in most cases, even on error.
llvm-svn: 60057
|
| |
|
|
| |
llvm-svn: 60005
|
| |
|
|
| |
llvm-svn: 59987
|
| |
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 59868
|
| |
|
|
| |
llvm-svn: 59853
|
| |
|
|
|
|
|
|
|
|
| |
one for building up the diagnostic that is in flight (DiagnosticBuilder)
and one for pulling structured information out of the diagnostic when
formatting and presenting it.
There is no functionality change with this patch.
llvm-svn: 59849
|
| |
|
|
|
|
| |
This version uses VLAs to represent arrays. I'll try an alternative way next, but I want this safe first.
llvm-svn: 59835
|
| |
|
|
| |
llvm-svn: 59820
|
| |
|
|
| |
llvm-svn: 59716
|