- User Since
- Jan 5 2017, 9:07 AM (145 w, 17 h)
Sep 14 2019
I just realised that the unqualified calls worked because a base class of type std::iterator means that functions in namespace std will be found by ADL. So you can ignore the last paragraph in the patch summary.
Jul 5 2019
May 4 2019
Dec 7 2018
- Committed the test framework changes separately as r348589 and r348603.
- Correctly cleanup the lambda scope if an error in encountered while parsing the template parameters.
- Replaced getExplicitTemplateParameterCount with getExplicitTemplateParameters, which returns an ArrayRef. This simplifies the handling of the parameters in a few places.
- Replaced a linear search over the template parameters with a binary search.
- Added expected error cases to the template lambda usage tests to ensure that the static assertions are correctly instantiated.
- Added a test for templated lambdas that're used within another template; TreeTransform already transforms the template parameter list so no change was needed to make the test pass.
Oct 13 2018
Sep 19 2018
I've added a fix for another related issue: the tests would fail to link if libc++ is built only as a DLL.
Sep 10 2018
Sep 9 2018
Thanks for the help with this.
I reverted most of my changes (including the parameterised tests) before committing; I think I implemented all of your suggestions.
Aug 29 2018
I've addressed most of your comments and resolved the merge conflicts introduced in r340838.
Aug 28 2018
Thanks for the detailed feedback; I’ll try to get a new patch up in a few hours.
- Re-uploaded with full context.
Aug 27 2018
Thanks, I've changed it so that the driver mode is calculated first.
I've also extended the unit test to include the various --driver-mode combinations.
Aug 16 2018
Thanks. I'm not planning to move forward with this until the contracts patch is ready (it might change enough to not even require this); that should leave plenty of time for others to take a look.
This seems like a reasonable addition. Maybe it could also provide print and printToString to more closely match the SourceLocation API?
Aug 15 2018
Aug 2 2018
Removed the extra predicate customisation point.
Aug 1 2018
The previous revision was an unnecessarily general solution to a specific problem.
Jul 30 2018
There’re a lot of places where you need a type that you can write down. E.g. function return type.
Jul 23 2018
- Made the suggested test changes.
- Added a missing visibility attribute.
- Added a simple test that type-checks the expected public interface.
Jul 22 2018
Jul 21 2018
- Resolved merge conflicts
- Don't assume that -fmodules-ts implies that we're in a TS module.
- Don't ignore private namespaces when calculating the ownership kind.
- Fixed the premature loop termination issue pointed out by @rsmith (and added a test case for it).
- Fixed a few small issues regarding diagnosing exported enum/struct/union declarations without a name (especially anonymous unions at namespace-scope).
- Factored out the loop body into a separate function to keep things tidy.
Jun 10 2018
Addressed Richard's comments.
Dec 29 2017
Dec 28 2017
I've removed the isExported fix for namespaces as it's somewhat unrelated to this patch.
I'll do a separate patch for fixing namespaces (which will include the stuff removed from here and a bit more)
I've been investigating an issue regarding visibility during code synthesis, and I noticed that this patch half fixes it. I've added the rest of the fix since it's related to what's going on here, and I guess this is now a "correctly handle imports from an interface unit" patch.
Dec 27 2017
Dec 24 2017
Dec 21 2017
Dec 3 2017
Nov 24 2017
Good idea, I've added that to the test.
I'll give Richard some time to look over this before committing.
Nov 21 2017
Nov 20 2017
Nov 15 2017
Resolved merge conflicts from the last month of changes (unittests/AST/StmtPrinterTest.cpp and lib/AST/DeclCXX.cpp)
Oct 14 2017
Oct 11 2017
I have access now, so I'm able to commit this myself.
However it's been a while since it was approved, so I'd be grateful if someone could take another look to make sure nothing has changed in the meantime (besides potentially needing to re-tag some new APIs).
Oct 9 2017
- Updated lambda mangling to include explicit template parameters
- Allow explicit template parameter lists on lambdas pre-c++2a as an extension.
- Improved the somewhat fragile template depth handling.
- Reformatted some asserts.
Sep 12 2017
Changed a CMake macro to a function.
Sep 11 2017
- Replaced an unneeded STLExtras.h include with <algorithm>.
- Assert that the lambda template scope has a parent before accessing it.
- Added an equals in a braced init as per the LLVM coding standards.
Sep 6 2017
Sep 2 2017
Thanks. Could someone commit this for me please?
Sep 1 2017
Okay, I've split the patch up as requested.
Aug 31 2017
I've added a couple more Windows macro-related fixes to the experimental library.
Aug 30 2017
Implemented pretty printing and recursive AST visiting (both with appropriate unit tests).
Aug 29 2017
Aug 28 2017
Hi Richard, thanks for your feedback. This update makes the changes that you requested.
It turns out that the casting is no longer an issue since ParseTemplateParameters has been refactored to use NamedDecl.
Aug 26 2017
Thanks for all of your feedback! It’s really helped to improve this patch.
Aug 25 2017
Aug 21 2017
- Info about a lambda's explicit template parameters is now exposed in the AST (see changes to LambdaExpr). It turns out that no extra storage was actually needed to achieve this.
So to clarify: NumExplicitTemplateParams should be stored in LambdaDefinitionData (with an accessor in LambdaExpr) and ExplicitTemplateParamRange (SourceRange) should be stored in LambdaExpr?
That makes sense, but doesn't seem consistent with how things are currently stored. E.g. NumCaptures is stored in both LambdaDefinitionData and LambdaExpr.
Aug 20 2017
Sorry, I've just spotted a small mistake in how the auto parameter depth is recorded.
This update fixes it.
- Corrected a typo.
- Made HasExplicitTemplateParams const.
- Reverted the change in where template depth is incremented and recorded.
- Fixed the broken test.
- Keep the template scope active instead of exiting it and manually introducing the template parameters into scope. I think this works fine now; you can see the fix in line 847 of SemaLambda.cpp. Basically having a template scope active resulted in the lambda being incorrectly marked as dependent, which broke a lot of stuff.
Aug 19 2017
Changed a documentation comment to use \brief instead of stating the function name.
Only enter the template parameter scope if needed.
Changed the phrasing of the diagnostic when an empty template parameter list is encountered.
Aug 18 2017
It's Friday, so hopefully this is good to go.
I don't have svn access, so could someone commit this for me?
Aug 16 2017
Aug 14 2017
Aug 13 2017
Aug 11 2017
@rjmccall The warning is emitted, but you're right that there's no test to ensure that actually happens; test/CXX/expr/expr.prim/expr.prim.lambda/p8.cpp used Wno-c++2a-extensions to suppress the warning.