mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
If the compiler arguments have errors in them (e.g. because a file with the same name is used twice), we can often still fulfill SourceKit requests because the compiler argument errors are only relevant for later stages of the compilation process. Instead of bailing out early, do a best effor retrieving the compiler arguments that are valid and ignoring the errors. Fixes rdar://77618144
13 lines
902 B
Swift
13 lines
902 B
Swift
// We should not fail if two distinct file have the same name - this is only an issue in CodeGen
|
|
// RUN: %sourcekitd-test -req=cursor -pos=1:7 %S/Inputs/invalid_compiler_args/A/File.swift -- %S/Inputs/invalid_compiler_args/A/File.swift %S/Inputs/invalid_compiler_args/B/File.swift | %FileCheck %s
|
|
|
|
// We can't do anything if the requested file is not in the compiler arguments
|
|
// RUN: not %sourcekitd-test -req=cursor -pos=1:7 %S/Inputs/invalid_compiler_args/A/File.swift --
|
|
// RUN: not %sourcekitd-test -req=cursor -pos=1:7 %S/Inputs/invalid_compiler_args/A/File.swift -- %S/Inputs/invalid_compiler_args/B/File.swift
|
|
|
|
// Specifying a file twice should just ignore one of them
|
|
// RUN: %sourcekitd-test -req=cursor -pos=1:7 %S/Inputs/invalid_compiler_args/A/File.swift -- %S/Inputs/invalid_compiler_args/A/File.swift %S/Inputs/invalid_compiler_args/A/File.swift
|
|
|
|
|
|
// CHECK: source.lang.swift.decl.class
|