#
1f476a17 |
| 26-Feb-2010 |
John McCall <rjmccall@apple.com> |
Fix an assertion-on-error during tentative constructor parsing by propagating error conditions out of the various annotate-me-a-snowflake routines. Generally (but not universally) removes redundant
Fix an assertion-on-error during tentative constructor parsing by propagating error conditions out of the various annotate-me-a-snowflake routines. Generally (but not universally) removes redundant diagnostics as well as, you know, not crashing on bad code. On the other hand, I have just signed myself up to fix fiddly parser errors for the next week. Again.
llvm-svn: 97221
show more ...
|
#
69f9dbc3 |
| 08-Feb-2010 |
John McCall <rjmccall@apple.com> |
Fix the crash-on-invalid from PR6259.
llvm-svn: 95554
|
#
497c0a41 |
| 26-Jan-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix two redefinitions in test cases that weren't diagnosed yet, but will be soon.
llvm-svn: 94565
|
#
e1ac8d17 |
| 13-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve the reporting of non-viable overload candidates by noting the reason why the candidate is non-viable. There's a lot we can do to improve this, but it's a good start. Further improvements sh
Improve the reporting of non-viable overload candidates by noting the reason why the candidate is non-viable. There's a lot we can do to improve this, but it's a good start. Further improvements should probably be integrated with the bad-initialization reporting routines.
llvm-svn: 93277
show more ...
|
#
fd0b2f8f |
| 06-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve the diagnostics used to report implicitly-generated class members as parts of overload sets. Also, refer to constructors as 'constructors' rather than functions.
Adjust a lot of tests.
llv
Improve the diagnostics used to report implicitly-generated class members as parts of overload sets. Also, refer to constructors as 'constructors' rather than functions.
Adjust a lot of tests.
llvm-svn: 92832
show more ...
|
#
1f4ee7bd |
| 19-Dec-2009 |
John McCall <rjmccall@apple.com> |
Just push a new scope when parsing an out-of-line variable definition. Magically fixes all the terrible lookup problems associated with not pushing a new scope. Resolves an ancient xfail and an LLVM
Just push a new scope when parsing an out-of-line variable definition. Magically fixes all the terrible lookup problems associated with not pushing a new scope. Resolves an ancient xfail and an LLVM misparse.
llvm-svn: 91769
show more ...
|
#
a4b592a7 |
| 19-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch more of Sema::CheckInitializerTypes over to InitializationSequence. Specially, switch initialization of a C++ class type (either copy- or direct-initialization).
Also, make sure that we crea
Switch more of Sema::CheckInitializerTypes over to InitializationSequence. Specially, switch initialization of a C++ class type (either copy- or direct-initialization).
Also, make sure that we create an elidable copy-construction when performing copy initialization of a C++ class variable. Fixes PR5826.
llvm-svn: 91750
show more ...
|
#
ea305edd |
| 18-Dec-2009 |
John McCall <rjmccall@apple.com> |
Pull Sema::isAcceptableLookupResult into SemaLookup. Extract the criteria into different functions and pick the function at lookup initialization time. In theory we could actually divide the criteri
Pull Sema::isAcceptableLookupResult into SemaLookup. Extract the criteria into different functions and pick the function at lookup initialization time. In theory we could actually divide the criteria functions into N different functions for the N cases, but it's so not worth it.
Among other things, lets us invoke LookupQualifiedName without recomputing IDNS info every time.
Do some refactoring in SemaDecl to avoid an awkward special case in LQN that was only necessary for redeclaration testing for anonymous structs/unions --- which could be done more efficiently with a scoped lookup anyway.
llvm-svn: 91676
show more ...
|
#
8fbe78f6 |
| 15-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead o
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target).
llvm-svn: 91446
show more ...
|
#
1c428032 |
| 07-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
reapply my patch for PR4451, which improves diagnostics for :: vs : confusion. This time with a fix to bail out when in a dependent context.
llvm-svn: 90730
|
#
ed085234 |
| 06-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
revert my previous patch, it is breaking something and I don't have time to fix it ATM.
llvm-svn: 90717
|
#
2b6651e9 |
| 06-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
this is really about both PR's, 4452 is "don't crash", 4451 is "recover nicely".
llvm-svn: 90714
|
#
71d5bf1c |
| 06-Dec-2009 |
Chris Lattner <sabre@nondot.org> |
implement PR4451, improving error recovery for a mistaken : where a :: was intended. On the first testcase in the bug, we now produce:
cxx-decl.cpp:12:2: error: unexpected ':' in nested name specif
implement PR4451, improving error recovery for a mistaken : where a :: was intended. On the first testcase in the bug, we now produce:
cxx-decl.cpp:12:2: error: unexpected ':' in nested name specifier y:a a2; ^ ::
instead of:
t.cc:8:1: error: C++ requires a type specifier for all declarations x:a a2; ^ t.cc:8:2: error: invalid token after top level declarator x:a a2; ^ ; t.cc:9:11: error: use of undeclared identifier 'a2' x::a a3 = a2; ^
llvm-svn: 90713
show more ...
|
#
7427fe28 |
| 29-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Remove unnecessary -fms-extensions=0 from tests (this command line syntax is going away).
llvm-svn: 90066
|
#
f73b282b |
| 25-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement the rules in C++ [basic.link] and C99 6.2.2 for computing the linkage of a declaration. Switch the lame (and completely wrong) NamedDecl::hasLinkage() over to using the new NamedDecl::getLi
Implement the rules in C++ [basic.link] and C99 6.2.2 for computing the linkage of a declaration. Switch the lame (and completely wrong) NamedDecl::hasLinkage() over to using the new NamedDecl::getLinkage(), along with the "can this declaration be a template argument?" check that started all of this.
Fixes -fsyntax-only for PR5597.
llvm-svn: 89891
show more ...
|
#
ec87bb5c |
| 27-Oct-2009 |
John Thompson <John.Thompson.JTSoftware@gmail.com> |
Disabling some MS extensions which cause these tests to fail
llvm-svn: 85236
|
Revision tags: llvmorg-2.6.0 |
|
#
15e5602e |
| 13-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics when the parser encounters a declarator with an unknown type name, e.g.,
foo::bar x;
when "bar" does not refer to a type in "foo".
With this change, the parser now calls int
Improve diagnostics when the parser encounters a declarator with an unknown type name, e.g.,
foo::bar x;
when "bar" does not refer to a type in "foo".
With this change, the parser now calls into the action to perform diagnostics and can try to recover by substituting in an appropriate type. For example, this allows us to easily diagnose some missing "typename" specifiers, which we now do:
test/SemaCXX/unknown-type-name.cpp:29:1: error: missing 'typename' prior to dependent type name 'A<T>::type' A<T>::type A<T>::f() { return type(); } ^~~~~~~~~~ typename
Fixes PR3990.
llvm-svn: 84053
show more ...
|
#
e40876a5 |
| 13-Oct-2009 |
Douglas Gregor <dgregor@apple.com> |
Unify our diagnostic printing for errors of the form, "we didn't like what we found when we looked into <blah>", where <blah> is a DeclContext*. We can now format DeclContext*'s in nice ways, e.g., "
Unify our diagnostic printing for errors of the form, "we didn't like what we found when we looked into <blah>", where <blah> is a DeclContext*. We can now format DeclContext*'s in nice ways, e.g., "namespace N", "the global namespace", "'class Foo'".
This is part of PR3990, but we're not quite there yet.
llvm-svn: 84028
show more ...
|
#
b7bfe794 |
| 02-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
Rewrite of our handling of name lookup in C++ member access expressions, e.g.,
x->Base::f
We no longer try to "enter" the context of the type that "x" points to. Instead, we drag that object type
Rewrite of our handling of name lookup in C++ member access expressions, e.g.,
x->Base::f
We no longer try to "enter" the context of the type that "x" points to. Instead, we drag that object type through the parser and pass it into the Sema routines that need to know how to perform lookup within member access expressions.
We now implement most of the crazy name lookup rules in C++ [basic.lookup.classref] for non-templated code, including performing lookup both in the context of the type referred to by the member access and in the scope of the member access itself and then detecting ambiguities when the two lookups collide (p1 and p4; p3 and p7 are still TODO). This change also corrects our handling of name lookup within template arguments of template-ids inside the nested-name-specifier (p6; we used to look into the scope of the object expression for them) and fixes PR4703.
I have disabled some tests that involve member access expressions where the object expression has dependent type, because we don't yet have the ability to describe dependent nested-name-specifiers starting with an identifier.
llvm-svn: 80843
show more ...
|
#
1a176f0b |
| 21-Jul-2009 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix a crash that occurs in this C++ case:
struct foo { static bool value; }; bool (foo::value); // crash because of parens
llvm-svn: 76538
|
#
d86a13e0 |
| 26-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
Improve error recovery in C++: when we hit 'implicit int' cases in C++, these are usually because the parser was thoroughly confused. In addition to typing the value being declared as an int and hop
Improve error recovery in C++: when we hit 'implicit int' cases in C++, these are usually because the parser was thoroughly confused. In addition to typing the value being declared as an int and hoping for the best, we mark the value as invalid so we don't get chains of errors when it is used downstream. In C, implicit int actually is valid, so typing the thing as int is good and marking it invalid is bad. :)
llvm-svn: 74266
show more ...
|
#
5558e9fc |
| 26-Jun-2009 |
Chris Lattner <sabre@nondot.org> |
fix PR4452, a crash on invalid. The error recovery is still terrible in this case but at least we don't crash :)
llvm-svn: 74264
|
#
b4a8fe8d |
| 14-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Make the implicit-int handling error recovery stuff handle C++ nested name specifiers. Now we emit stuff like:
t.cpp:8:13: error: unknown type name 'X' static foo::X P; ~~~~ ^
instead of:
Make the implicit-int handling error recovery stuff handle C++ nested name specifiers. Now we emit stuff like:
t.cpp:8:13: error: unknown type name 'X' static foo::X P; ~~~~ ^
instead of:
t.cpp:8:16: error: invalid token after top level declarator static foo::X P; ^
This is inspired by a really awful error message I got from g++ when I misspelt diag::kind as diag::Kind.
llvm-svn: 69086
show more ...
|
#
869c6610 |
| 12-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
Fix some C++ error recovery problems in init declarator parsing that I noticed working on other things.
Instead of emitting:
t2.cc:1:8: error: use of undeclared identifier 'g' int x(*g); ^ t
Fix some C++ error recovery problems in init declarator parsing that I noticed working on other things.
Instead of emitting:
t2.cc:1:8: error: use of undeclared identifier 'g' int x(*g); ^ t2.cc:1:10: error: expected ')' int x(*g); ^ t2.cc:1:6: note: to match this '(' int x(*g); ^
We now only emit:
t2.cc:1:7: warning: type specifier missing, defaults to 'int' int x(*g); ^
Note that the example in SemaCXX/nested-name-spec.cpp:f4 is still not great, we now produce both of:
void f4(undef::C); // expected-error {{use of undeclared identifier 'undef'}} \ expected-error {{variable has incomplete type 'void'}}
The second diagnostic should be silenced by something getting marked invalid. I don't plan to fix this though.
llvm-svn: 68919
show more ...
|
#
170512fa |
| 01-Apr-2009 |
Douglas Gregor <dgregor@apple.com> |
Add some more code modification hints
llvm-svn: 68261
|