Page MenuHomePhabricator

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

Authored by eduucaldas on Mon, Sep 7, 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.Mon, Sep 7, 10:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptMon, Sep 7, 10:51 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
eduucaldas requested review of this revision.Mon, Sep 7, 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.Mon, Sep 7, 11:43 PM
gribozavr2 added inline comments.
clang/unittests/Tooling/Syntax/BuildTreeTest.cpp
4227

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.Mon, Sep 7, 11:43 PM
eduucaldas updated this revision to Diff 290439.Tue, Sep 8, 2:49 AM

Test init declarator with default arguments

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