Files
swift-mirror/test/IDE/clang-importing/complete_with_clang_comments.swift
Argyrios Kyrtzidis e7c55789c5 [ClangImporter] Fix issue with source order comparisons of clang source locations when using a bridging PCH
Clang importer was picking the beginning of the main FileID as include location of its modules, which is the same location that the clang PCH mechanism is using as import location.
Make sure to use a different location otherwise we'll have problems with source order comparisons of clang source locations not being deterministic.

rdar://29137319
2019-01-17 11:10:44 -08:00

15 lines
950 B
Swift

// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -code-completion -source-filename %s -code-completion-token=TOP -code-completion-comments=true \
// RUN: -import-objc-header %S/Inputs/bridge.h -I %S/Inputs/somemod1 -I %S/Inputs/somemod2 | %FileCheck %s -check-prefix=CHECK-TOP
// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -code-completion -source-filename %s -code-completion-token=TOP -code-completion-comments=true \
// RUN: -import-objc-header %S/Inputs/bridge.h -pch-output-dir %t.pch -I %S/Inputs/somemod1 -I %S/Inputs/somemod2 | %FileCheck %s -check-prefix=CHECK-TOP
// REQUIRES: objc_interop
import somemod2
#^TOP^#
// CHECK-TOP: name=some_func11(); comment=some_func11 is cool function.
// CHECK-TOP: name=some_func12(); comment=some_func12 is cool function.
// CHECK-TOP: name=some_func21(); comment=some_func21 is cool function.
// CHECK-TOP: name=some_func22(); comment=some_func22 is cool function.