mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When importing C++ decls in symbolic mode, class templates are not instantiated, which means they might not have a destructor or a move constructor. Make sure we are not trying to diagnose those missing lifetime operations in symbolic mode. This fixes incorrect diagnostics that were emitted during indexing at the end of compilation: ``` warning: 'import_owned' Swift attribute ignored on type 'basic_string': type is not copyable or destructible ``` As a nice side effect, this moves the logic that emits these diagnostics from the request body, which might be invoked many times, to the importer itself, which is only invoked once per C++ class. rdar://147421710