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

Position of attribute of lambda call operator relative to _noexcept-specifier_ is inconsistent with GCC and MSVC #70556

Open
JohelEGP opened this issue Oct 28, 2023 · 2 comments
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema"

Comments

@JohelEGP
Copy link

I found this out while working on hsutter/cppfront#506.
See https://compiler-explorer.com/z/qnMEv81Tx:

#if defined(_MSC_VER)
auto f = []() noexcept [[msvc::forceinline]] { };
#elif !defined(__clang__)
auto f = []() noexcept __attribute__((always_inline)) { };
#else
auto f = []() __attribute__((always_inline)) noexcept { };
#endif
@EugeneZelenko EugeneZelenko added clang:frontend Language frontend issues, e.g. anything involving "Sema" and removed new issue labels Oct 28, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Oct 28, 2023

@llvm/issue-subscribers-clang-frontend

Author: Johel Ernesto Guerrero Peña (JohelEGP)

I found this out while working on <https://github.com/hsutter/cppfront/pull/506>. See <https://compiler-explorer.com/z/qnMEv81Tx>: ```C++ #if defined(_MSC_VER) auto f = []() noexcept [[msvc::forceinline]] { }; #elif !defined(__clang__) auto f = []() noexcept __attribute__((always_inline)) { }; #else auto f = []() __attribute__((always_inline)) noexcept { }; #endif ```

@shafik
Copy link
Collaborator

shafik commented Oct 29, 2023

CC @erichkeane

@tbaederr tbaederr changed the title Position of attribute of lambda call operator relative to _noexcept-specifier_ is inconsisntent with GCC and MSVC Position of attribute of lambda call operator relative to _noexcept-specifier_ is inconsistent with GCC and MSVC Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
None yet
Development

No branches or pull requests

4 participants