Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cxx-interop] Name lookup failures in C++20 mode on Linux #65710

Closed
Tracked by #65808
egorzhdan opened this issue May 5, 2023 · 0 comments · Fixed by #65715
Closed
Tracked by #65808

[cxx-interop] Name lookup failures in C++20 mode on Linux #65710

egorzhdan opened this issue May 5, 2023 · 0 comments · Fixed by #65715
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. c++ interop Feature: Interoperability with C++ c++ to swift Feature → c++ interop: c++ to swift compiler The Swift compiler itself Linux Platform: Linux name lookup Area → compiler → type checker: Name lookup swift 5.9 unexpected error Bug: Unexpected error

Comments

@egorzhdan
Copy link
Contributor

Running test/Interop/Cxx/concepts/method-requires.swift on Linux exposes a name lookup issue:

test/Interop/Cxx/concepts/method-requires.swift:5:9: error: cannot find 'MyStruct' in scope
var s = MyStruct()
        ^~~~~~~~

This is only reproducible when -Xcc -std=gnu++20 is passed.

@egorzhdan egorzhdan added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. c++ interop Feature: Interoperability with C++ compiler The Swift compiler itself labels May 5, 2023
@egorzhdan egorzhdan self-assigned this May 5, 2023
@egorzhdan egorzhdan changed the title [cxx-interop] Name lookup failures in C++20 mode [cxx-interop] Name lookup failures in C++20 mode on Linux May 5, 2023
egorzhdan added a commit that referenced this issue May 5, 2023
Clang implicitly enables local submodule visibility when compiling in C++20 mode. ClangImporter does not support it, so let's disable it explicitly.

rdar://108959307 / #65710
@AnthonyLatsis AnthonyLatsis added Linux Platform: Linux name lookup Area → compiler → type checker: Name lookup c++ to swift Feature → c++ interop: c++ to swift swift 5.9 unexpected error Bug: Unexpected error labels May 6, 2023
egorzhdan added a commit that referenced this issue May 14, 2023
Clang implicitly enables local submodule visibility when compiling in C++20 mode. ClangImporter does not support it, so let's disable it explicitly.

rdar://108959307 / #65710
(cherry picked from commit aed5614)
meg-gupta pushed a commit to meg-gupta/swift that referenced this issue May 22, 2023
Clang implicitly enables local submodule visibility when compiling in C++20 mode. ClangImporter does not support it, so let's disable it explicitly.

rdar://108959307 / swiftlang#65710
NuriAmari pushed a commit to NuriAmari/swift that referenced this issue May 28, 2023
Clang implicitly enables local submodule visibility when compiling in C++20 mode. ClangImporter does not support it, so let's disable it explicitly.

rdar://108959307 / swiftlang#65710
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. c++ interop Feature: Interoperability with C++ c++ to swift Feature → c++ interop: c++ to swift compiler The Swift compiler itself Linux Platform: Linux name lookup Area → compiler → type checker: Name lookup swift 5.9 unexpected error Bug: Unexpected error
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants