When an already existing class is encountered during import,
check if it has implicit methods that are missing in the existing one,
and import these.
The to-be-imported code may use the same class in different way than the
existing (before the import) code. This may result in that there are
implicit methods that are not generated for the existing code.
Details
Details
Diff Detail
Diff Detail
- Repository
- rC Clang
- Build Status
Buildable 20392 Build 20392: arc lint + arc unit
Event Timeline
Comment Actions
LGTM. Just some stylish nits.
To resolve this issue, I used Sema::DeclareImplicit... methods. But I like this approach much more because it doesn't allows to forget different kinds of implicit methods and doesn't require passing Sema into ASTImporter.
lib/AST/ASTImporter.cpp | ||
---|---|---|
2221 | ... because implicit methods are created only if they are used. | |
unittests/AST/ASTImporterTest.cpp | ||
2362 | /*ExpectedCount=*/. Same below. | |
2365 | clang-format places a space before the template parameter list. |
... because implicit methods are created only if they are used.