summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/basic/basic.lookup/basic.lookup.argdep
Commit message (Collapse)AuthorAgeFilesLines
* [Sema] ADL: Associated namespaces for class types and enumeration types (CWG ↵Bruno Ricci2019-04-221-5/+13
| | | | | | | | | | | | | | | | | | | 1691) CWG 1691 changed the definition of the namespaces associated with a class type or enumeration type. For a class type, the associated namespaces are the innermost enclosing namespaces of the associated classes. For an enumeration type, the associated namespace is the innermost enclosing namespace of its declaration. This also fixes CWG 1690 and CWG 1692. Differential Revision: https://reviews.llvm.org/D60573 Reviewed By: rjmccall, rsmith llvm-svn: 358882
* [Sema][NFC] Add more tests for the behavior of argument-dependent name lookupBruno Ricci2019-04-225-0/+565
| | | | | | | | | | | | | | | | | | | | | | | The goal here is to exercise each rule in [basic.lookup.argdep] at least once. These new tests expose what I believe are 2 issues: 1. CWG 1691 needs to be implemented (p2: [...] Its associated namespaces are the innermost enclosing namespaces of its associated classes [...]) The corresponding tests are adl_class_type::X2 and adl_class_type::X5. 2. The end of paragraph 2 ([...] Additionally, if the aforementioned set of overloaded functions is named with a template-id, its associated classes and namespaces also include those of its type template-arguments and its template template-arguments.) is not implemented. Closely related, the restriction on non-dependent parameter types in this same paragraph needs to be removed. The corresponding tests are in adl_overload_set (both issues are from CWG 997). Differential Revision: https://reviews.llvm.org/D60570 Reviewed By: riccibruno, Quuxplusone llvm-svn: 358881
* [Lit Test] Updated 34 Lit tests to be C++11 compatible.Charles Li2015-11-171-0/+5
| | | | | | | Added expected diagnostics new to C++11. Expanded RUN line to: default, C++98/03 and C++11. llvm-svn: 253371
* Added warning on structures/unions that are empty or contain onlySerge Pavlov2013-11-141-1/+1
| | | | | | | | | | bit fields of zero size. Warnings are generated in C++ mode and if only such type is defined inside extern "C" block. The patch fixed PR5065. Differential Revision: http://llvm-reviews.chandlerc.com/D2151 llvm-svn: 194653
* Teach typo correction to look inside of classes like it does namespaces.Kaelyn Uhrain2013-09-261-4/+4
| | | | | | | | | | | | | | | Unlike with namespaces, searching inside of classes requires also checking the access to correction candidates (i.e. don't suggest a correction to a private class member for a correction occurring outside that class and its methods or friends). Included is a small (one line) fix for a bug, that was uncovered while cleaning up the unit tests, where the decls from a TypoCorrection candidate were preserved in new TypoCorrection candidates that are derived (copied) from the old TypoCorrection--notably when creating a new candidate by changing the NestedNameSpecifier associated with the base idenitifer. llvm-svn: 191449
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-191-0/+1
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* Instantiate class template specializations during ADL.John McCall2012-08-241-0/+24
| | | | llvm-svn: 162586
* Modify how the -verify flag works. Currently, the verification string andRichard Trieu2011-12-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | diagnostic message are compared. If either is a substring of the other, then no error is given. This gives rise to an unexpected case: // expect-error{{candidate function has different number of parameters}} will match the following error messages from Clang: candidate function has different number of parameters (expected 1 but has 2) candidate function has different number of parameters It will also match these other error messages: candidate function function has different number of parameters number of parameters This patch will change so that the verification string must be a substring of the diagnostic message before accepting. Also, all the failing tests from this change have been corrected. Some stats from this cleanup: 87 - removed extra spaces around verification strings 70 - wording updates to diagnostics 40 - extra leading or trailing characters (typos, unmatched parens or quotes) 35 - diagnostic level was included (error:, warning:, or note:) 18 - flag name put in the warning (-Wprotocol) llvm-svn: 146619
* Update this test to reflect the new (deterministic) order in r134038.Chandler Carruth2011-06-281-2/+2
| | | | | | | This was part of Kaelyn's original patch that got dropped while I was working on it, but after I ran my tests. =/ Sorry. llvm-svn: 134039
* Modify test case to allow buildbots to make forward progress. This test shouldChad Rosier2011-06-281-2/+2
| | | | | | | now (incorrectly) pass. Once the appropriate fixes have been made this test should be reverted. llvm-svn: 134035
* Add support for C++ namespace-aware typo correction, e.g., correctingDouglas Gregor2011-06-281-3/+10
| | | | | | | | | | | | | | | vector<int> to std::vector<int> Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes PR5776/<rdar://problem/8652971>. Thanks Kaelyn! llvm-svn: 134007
* Teach Sema::ActOnUninitializedDecl() not to try to interpret when oneDouglas Gregor2011-05-211-0/+3
| | | | | | | | should use a constructor to default-initialize a variable. InitializationSequence knows the rules for default initialization, better. Fixes <rdar://problem/8501008>. llvm-svn: 131796
* When emitting a "too many arguments to function call..." error, also include ↵Ted Kremenek2011-04-041-1/+1
| | | | | | a note with a location for the function prototype. llvm-svn: 128833
* "const std::vector<int>*" not "std::vector<int> const*"Chris Lattner2010-09-051-1/+1
| | | | llvm-svn: 113094
* A more minimal fix for PR6762.John McCall2010-05-281-0/+11
| | | | llvm-svn: 104991
* Roll back r104941.John McCall2010-05-281-11/+0
| | | | llvm-svn: 104990
* Add a new attribute on records, __attribute__((adl_invisible)), and defineJohn McCall2010-05-281-0/+11
| | | | | | | | | | | | the x86-64 __va_list_tag with this attribute. The attribute causes the affected type to behave like a fundamental type when considered by ADL. (x86-64 is the only target we currently provide with a struct-based __builtin_va_list) Fixes PR6762. llvm-svn: 104941
* Test case for r104938.John McCall2010-05-281-0/+11
| | | | llvm-svn: 104939
* Fix ADL for types declared in transparent decls, from Alp Toker!Douglas Gregor2010-04-301-0/+15
| | | | llvm-svn: 102695
* Put function templates instantiated from friend declarations in the correctJohn McCall2010-03-261-0/+12
| | | | | | lexical context. This is required for ADL to work properly; fixes PR6716. llvm-svn: 99665
* Introduce a centralized routine in Sema for diagnosing failed lookups (whenJohn McCall2009-12-161-1/+1
| | | | | | | | | used as expressions). In dependent contexts, try to recover by doing a lookup in previously-dependent base classes. We get better diagnostics out, but unfortunately the recovery fails: we need to turn it into a method call expression, not a bare call expression. Thus this is still a WIP. llvm-svn: 91525
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-154-4/+4
| | | | | | | | | - 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
* Use a more rigorous definition of 'class member'. I don't have any evidenceJohn McCall2009-12-021-0/+20
| | | | | | that this was causing a problem, but it could have. llvm-svn: 90343
* Argument-dependent lookup for friend declarations. Add a new decl type,John McCall2009-08-111-0/+42
| | | | | | | | | | | | FriendFunctionDecl, and create instances as appropriate. The design of FriendFunctionDecl is still somewhat up in the air; you can befriend arbitrary types of functions --- methods, constructors, etc. --- and it's not clear that this representation captures that very well. We'll have a better picture when we start consuming this data in access control. llvm-svn: 78653
* Fix a corner case with argument-dependent lookup and overloaded function sets.Douglas Gregor2009-07-081-0/+11
| | | | llvm-svn: 74999
* Improve argument-dependent lookup to find associated classes andDouglas Gregor2009-07-082-0/+89
namespaces based on the template arguments of a class template specialization type. llvm-svn: 74993
OpenPOWER on IntegriCloud