This is an archive of the discontinued LLVM Phabricator instance.

[clang][ASTImporter] Add support for importing CXXFoldExpr.
ClosedPublic

Authored by balazske on Jan 15 2021, 8:54 AM.

Diff Detail

Event Timeline

balazske created this revision.Jan 15 2021, 8:54 AM
balazske requested review of this revision.Jan 15 2021, 8:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 15 2021, 8:54 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
shafik added inline comments.Jan 15 2021, 1:58 PM
clang/unittests/AST/ASTImporterTest.cpp
655

Is it possible to check that we imported four fold expressions and maybe also check the operator of each one?

balazske updated this revision to Diff 317278.Jan 18 2021, 1:13 AM

Improved test.

balazske marked an inline comment as done.Jan 18 2021, 1:15 AM
balazske added inline comments.
clang/unittests/AST/ASTImporterTest.cpp
655

Added more exact checks.

balazske marked an inline comment as done.
martong accepted this revision.Jan 19 2021, 6:42 AM

Looks good to me! Thanks!

clang/lib/AST/ASTImporter.cpp
8019

Could you please address the Lint messages? Making it auto * has sense.

clang/unittests/AST/ASTImporterTest.cpp
642–649

Perhaps we could add this directly to ASTMatchers.h ?

This revision is now accepted and ready to land.Jan 19 2021, 6:42 AM
balazske updated this revision to Diff 317894.Jan 20 2021, 8:48 AM

Removed use of auto.

martong accepted this revision.Jan 20 2021, 9:20 AM

Thanks for the update!

shafik accepted this revision.Jan 20 2021, 9:43 AM

LGTM, thank you for expanding the test!

balazske added inline comments.Jan 20 2021, 11:47 PM
clang/unittests/AST/ASTImporterTest.cpp
642–649

It would make sense, CXXFoldExpr could be needed by other users.

balazske added inline comments.Jan 21 2021, 11:55 PM
clang/unittests/AST/ASTImporterTest.cpp
642–649

But I plan to commit this as is, there are other matchers in this file that could be put into ASTMatchers.h, it should be checked why these are not there and which ones to put into the header.