-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
consteval function not allowed in default argument to constexpr constructor #48230
Comments
*** Bug llvm/llvm-bugzilla-archive#51483 has been marked as a duplicate of this bug. *** |
*** Bug #47058 has been marked as a duplicate of this bug. *** |
mentioned in issue llvm/llvm-bugzilla-archive#51483 |
Thanks for the issue! I suggested a possible fix, which affects the ParmVarDecl's custom AST visitor - https://reviews.llvm.org/D119646 |
@llvm/issue-subscribers-clang-frontend |
in a recent clang change, __builtin_source_location was added. see https://reviews.llvm.org/rGd61487490022 . but a bug in clang frontend pratically prevents us from using it. see llvm/llvm-project#48230. so before this issue is fixed, we have to prevent clang from using the builtin source location implementation. Signed-off-by: Kefu Chai <tchaikov@gmail.com>
in a recent clang change, __builtin_source_location was added. see https://reviews.llvm.org/rGd61487490022 . but a bug in clang frontend pratically prevents us from using it. see llvm/llvm-project#48230. so before this issue is fixed, we have to prevent clang from using the builtin source location implementation. in this change, a new library is added for introducing the macro of "SEASTAR_BROKEN_SOURCE_LOCATION", if it is defined we'd have to use the homebrew implementation of source_location even the header file of <source_location> or <experimental/source_location> can be found by the C++ compiler. Signed-off-by: Kefu Chai <tchaikov@gmail.com>
in a recent clang change, __builtin_source_location was added. see https://reviews.llvm.org/rGd61487490022 . but a bug in clang frontend pratically prevents us from using it. see llvm/llvm-project#48230. so before this issue is fixed, we have to prevent clang from using the builtin source location implementation. in this change, a new library is added for introducing the macro of "SEASTAR_BROKEN_SOURCE_LOCATION", if it is defined we'd have to use the homebrew implementation of source_location even the header file of <source_location> or <experimental/source_location> can be found by the C++ compiler. Signed-off-by: Kefu Chai <tchaikov@gmail.com>
in a recent clang change, __builtin_source_location was added. see https://reviews.llvm.org/rGd61487490022 . but a bug in clang frontend pratically prevents us from using it. see llvm/llvm-project#48230. so before this issue is fixed, we have to prevent clang from using the builtin source location implementation. in this change, a new library is added for introducing the macro of "SEASTAR_BROKEN_SOURCE_LOCATION", if it is defined we'd have to use the homebrew implementation of source_location even the header file of <source_location> or <experimental/source_location> can be found by the C++ compiler. please note, -std=c++20 is not added to CMAKE_REQUIRED_FLAGS when performing the test, because we want to ensure that we are using the same CXX_FLAGS as the ones when compiling std-compat.hh. Signed-off-by: Kefu Chai <tchaikov@gmail.com>
in a recent clang change, __builtin_source_location was added. see https://reviews.llvm.org/rGd61487490022 . but a bug in clang frontend pratically prevents us from using it. see llvm/llvm-project#48230. so before this issue is fixed, we have to prevent clang from using the builtin source location implementation. in this change, a new library is added for introducing the macro of "SEASTAR_BROKEN_SOURCE_LOCATION", if it is defined we'd have to use the homebrew implementation of source_location even the header file of <source_location> or <experimental/source_location> can be found by the C++ compiler. please note, -std=c++20 is not added to CMAKE_REQUIRED_FLAGS when performing the test, because we want to ensure that we are using the same CXX_FLAGS as the ones when compiling std-compat.hh. Signed-off-by: Kefu Chai <tchaikov@gmail.com> Message-Id: <20220516151733.411546-1-tchaikov@gmail.com>
in a recent clang change, __builtin_source_location was added. see https://reviews.llvm.org/rGd61487490022 . but a bug in clang frontend pratically prevents us from using it. see llvm/llvm-project#48230. so before this issue is fixed, we have to prevent clang from using the builtin source location implementation. in this change, a new library is added for introducing the macro of "SEASTAR_BROKEN_SOURCE_LOCATION", if it is defined we'd have to use the homebrew implementation of source_location even the header file of <source_location> or <experimental/source_location> can be found by the C++ compiler. please note, -std=c++20 is not added to CMAKE_REQUIRED_FLAGS when performing the test, because we want to ensure that we are using the same CXX_FLAGS as the ones when compiling std-compat.hh. Signed-off-by: Kefu Chai <tchaikov@gmail.com>
in a recent clang change, __builtin_source_location was added. see https://reviews.llvm.org/rGd61487490022 . but a bug in clang frontend pratically prevents us from using it. see llvm/llvm-project#48230. so before this issue is fixed, we have to prevent clang from using the builtin source location implementation. in this change, a new library is added for introducing the macro of "SEASTAR_BROKEN_SOURCE_LOCATION", if it is defined we'd have to use the homebrew implementation of source_location even the header file of <source_location> or <experimental/source_location> can be found by the C++ compiler. please note, -std=c++20 is not added to CMAKE_REQUIRED_FLAGS when performing the test, because we want to ensure that we are using the same CXX_FLAGS as the ones when compiling std-compat.hh. Signed-off-by: Kefu Chai <tchaikov@gmail.com>
in a recent clang change, __builtin_source_location was added. see https://reviews.llvm.org/rGd61487490022 . but a bug in clang frontend pratically prevents us from using it. see llvm/llvm-project#48230. so before this issue is fixed, we have to prevent clang from using the builtin source location implementation. in this change, a new library is added for introducing the macro of "SEASTAR_BROKEN_SOURCE_LOCATION", if it is defined we'd have to use the homebrew implementation of source_location even the header file of <source_location> or <experimental/source_location> can be found by the C++ compiler. please note, -std=c++20 is not added to CMAKE_REQUIRED_FLAGS when performing the test, because we want to ensure that we are using the same CXX_FLAGS as the ones when compiling std-compat.hh. Signed-off-by: Kefu Chai <tchaikov@gmail.com>
in a recent clang change, __builtin_source_location was added. see https://reviews.llvm.org/rGd61487490022 . but a bug in clang frontend pratically prevents us from using it. see llvm/llvm-project#48230. so before this issue is fixed, we have to prevent clang from using the builtin source location implementation. in this change, a new library is added for introducing the macro of "SEASTAR_BROKEN_SOURCE_LOCATION", if it is defined we'd have to use the homebrew implementation of source_location even the header file of <source_location> or <experimental/source_location> can be found by the C++ compiler. please note, -std=c++20 is not added to CMAKE_REQUIRED_FLAGS when performing the test, because we want to ensure that we are using the same CXX_FLAGS as the ones when compiling std-compat.hh. Signed-off-by: Kefu Chai <tchaikov@gmail.com>
in a recent clang change, __builtin_source_location was added. see https://reviews.llvm.org/rGd61487490022 . but a bug in clang frontend pratically prevents us from using it. see llvm/llvm-project#48230. so before this issue is fixed, we have to prevent clang from using the builtin source location implementation. in this change, a new library is added for introducing the macro of "SEASTAR_BROKEN_SOURCE_LOCATION", if it is defined we'd have to use the homebrew implementation of source_location even the header file of <source_location> or <experimental/source_location> can be found by the C++ compiler. please note, -std=c++20 is not added to CMAKE_REQUIRED_FLAGS when performing the test, because we want to ensure that we are using the same CXX_FLAGS as the ones when compiling std-compat.hh. Signed-off-by: Kefu Chai <tchaikov@gmail.com>
in a recent clang change, __builtin_source_location was added. see https://reviews.llvm.org/rGd61487490022 . but a bug in clang frontend pratically prevents us from using it. see llvm/llvm-project#48230. so before this issue is fixed, we have to prevent clang from using the builtin source location implementation. in this change, a new library is added for introducing the macro of "SEASTAR_BROKEN_SOURCE_LOCATION", if it is defined we'd have to use the homebrew implementation of source_location even the header file of <source_location> or <experimental/source_location> can be found by the C++ compiler. please note, -std=c++20 is not added to CMAKE_REQUIRED_FLAGS when performing the test, because we want to ensure that we are using the same CXX_FLAGS as the ones when compiling std-compat.hh. Signed-off-by: Kefu Chai <tchaikov@gmail.com> Message-Id: <20220519134839.1818862-2-tchaikov@gmail.com>
in a recent clang change, __builtin_source_location was added. see https://reviews.llvm.org/rGd61487490022 . but a bug in clang frontend pratically prevents us from using it. see llvm/llvm-project#48230. so before this issue is fixed, we have to prevent clang from using the builtin source location implementation. in this change, a new library is added for introducing the macro of "SEASTAR_BROKEN_SOURCE_LOCATION", if it is defined we'd have to use the homebrew implementation of source_location even the header file of <source_location> or <experimental/source_location> can be found by the C++ compiler. please note, -std=c++20 is not added to CMAKE_REQUIRED_FLAGS when performing the test, because we want to ensure that we are using the same CXX_FLAGS as the ones when compiling std-compat.hh. Signed-off-by: Kefu Chai <tchaikov@gmail.com> Message-Id: <20220519134839.1818862-2-tchaikov@gmail.com>
in a recent clang change, __builtin_source_location was added. see https://reviews.llvm.org/rGd61487490022 . but a bug in clang frontend pratically prevents us from using it. see llvm/llvm-project#48230. so before this issue is fixed, we have to prevent clang from using the builtin source location implementation. in this change, a new library is added for introducing the macro of "SEASTAR_BROKEN_SOURCE_LOCATION", if it is defined we'd have to use the homebrew implementation of source_location even the header file of <source_location> or <experimental/source_location> can be found by the C++ compiler. please note, -std=c++20 is not added to CMAKE_REQUIRED_FLAGS when performing the test, because we want to ensure that we are using the same CXX_FLAGS as the ones when compiling std-compat.hh. Signed-off-by: Kefu Chai <tchaikov@gmail.com> Message-Id: <20220519134839.1818862-2-tchaikov@gmail.com>
Note that this bug is causing std::source_location in libstdc++ to be broken -- and also effectively blocking source_location for libc++, https://reviews.llvm.org/D120634 (not much point in committing it if nobody can use it). |
Extended Description
Hello,
the following valid code is currently rejected by Clang 11 and trunk (https://godbolt.org/z/645McM):
The error is:
I had a brief communication with Richard Smith who confirmed that the code above is valid.
I assume this bug is similar to #47058
Best,
Andreas
The text was updated successfully, but these errors were encountered: