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

[Meta] ROOT's llvm has issues with ranges coming from the Macos 14.3 sdk (llvm 15) #13698

Closed
1 task done
dpiparo opened this issue Sep 21, 2023 · 0 comments · Fixed by #13700
Closed
1 task done

[Meta] ROOT's llvm has issues with ranges coming from the Macos 14.3 sdk (llvm 15) #13698

dpiparo opened this issue Sep 21, 2023 · 0 comments · Fixed by #13700

Comments

@dpiparo
Copy link
Member

dpiparo commented Sep 21, 2023

Check duplicate issues.

  • Checked for duplicates

Description

If the head of ROOT is taken, C++ 20 specified and the build process started, the pcm file of libCore cannot be generated because of this error (at least):

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/__ranges/elements_view.h:155:38: error: cannot take address of consteval function '__get_iterator_category' outside of an immediate invocation
  using iterator_category = decltype(__get_iterator_category());

Reproducer

Take a mac with the 14.3 sdk (LLVM 15)root master, enable C++ 20, cmake, make.

ROOT version

master and 6.28

Installation method

build from sources

Operating system

macos

Additional context

No response

@dpiparo dpiparo added the bug label Sep 21, 2023
@hahnjo hahnjo self-assigned this Sep 21, 2023
hahnjo pushed a commit to hahnjo/root that referenced this issue Sep 21, 2023
We deferred the evaluation of dependent immediate invocations in https://reviews.llvm.org/D119375 until instantiation.
We should also not consider them referenced from a non-consteval context.

Fixes: llvm/llvm-project#55601

```
template<typename T>
class Bar {
  consteval static T x() { return 5; }
 public:
  Bar() : a(x()) {}

 private:
  int a;
};

Bar<int> g();
```
Is now accepted by clang. Previously it errored with: `cannot take address of consteval function 'x' outside of an immediate invocation  Bar() : a(x()) {}`

Differential Revision: https://reviews.llvm.org/D132031

---

Fixes root-project#13698, a problem
with the new C++ headers from the new macOS SDK.
dpiparo pushed a commit that referenced this issue Sep 21, 2023
We deferred the evaluation of dependent immediate invocations in https://reviews.llvm.org/D119375 until instantiation.
We should also not consider them referenced from a non-consteval context.

Fixes: llvm/llvm-project#55601

```
template<typename T>
class Bar {
  consteval static T x() { return 5; }
 public:
  Bar() : a(x()) {}

 private:
  int a;
};

Bar<int> g();
```
Is now accepted by clang. Previously it errored with: `cannot take address of consteval function 'x' outside of an immediate invocation  Bar() : a(x()) {}`

Differential Revision: https://reviews.llvm.org/D132031

---

Fixes #13698, a problem
with the new C++ headers from the new macOS SDK.
@hahnjo hahnjo added this to Issues in Fixed in 6.30/00 via automation Sep 21, 2023
dpiparo added a commit to dpiparo/root that referenced this issue Sep 26, 2023
This is an adaptation of commit 6627da7
Fixes root-project#13698, a problem
with the new C++ headers from the new macOS SDK.
@dpiparo dpiparo mentioned this issue Sep 26, 2023
1 task
dpiparo added a commit that referenced this issue Sep 26, 2023
This is an adaptation of commit 6627da7
Fixes #13698, a problem
with the new C++ headers from the new macOS SDK.
maksgraczyk pushed a commit to maksgraczyk/root that referenced this issue Jan 12, 2024
We deferred the evaluation of dependent immediate invocations in https://reviews.llvm.org/D119375 until instantiation.
We should also not consider them referenced from a non-consteval context.

Fixes: llvm/llvm-project#55601

```
template<typename T>
class Bar {
  consteval static T x() { return 5; }
 public:
  Bar() : a(x()) {}

 private:
  int a;
};

Bar<int> g();
```
Is now accepted by clang. Previously it errored with: `cannot take address of consteval function 'x' outside of an immediate invocation  Bar() : a(x()) {}`

Differential Revision: https://reviews.llvm.org/D132031

---

Fixes root-project#13698, a problem
with the new C++ headers from the new macOS SDK.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants