This is an archive of the discontinued LLVM Phabricator instance.

[SyntaxTree] Fix crash on functions with default arguments.
ClosedPublic

Authored by eduucaldas on Sep 7 2020, 10:51 AM.

Details

Summary
  • Do not visit CXXDefaultArgExpr
  • To build CallArguments nodes, just go through non-default arguments

Diff Detail

Event Timeline

eduucaldas created this revision.Sep 7 2020, 10:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 7 2020, 10:51 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
eduucaldas requested review of this revision.Sep 7 2020, 10:51 AM

Please also add tests for calls to constructors without arguments and calls to implicit constructors 1 argument, as requested in https://reviews.llvm.org/D86700.

Add tests for constructor calls

gribozavr2 accepted this revision.Sep 7 2020, 11:43 PM
gribozavr2 added inline comments.
clang/unittests/Tooling/Syntax/BuildTreeTest.cpp
3931

Please also add tests that use this syntax:

X x1;
X x2(1);
X x3(1, '2');
This revision is now accepted and ready to land.Sep 7 2020, 11:43 PM
eduucaldas updated this revision to Diff 290439.Sep 8 2020, 2:49 AM

Test init declarator with default arguments

This revision was landed with ongoing or failed builds.Sep 8 2020, 2:54 AM
This revision was automatically updated to reflect the committed changes.