Repository: conan-io/conan

Issue:
[feature] Support for Xcode 15 (currently RC)
### What is your suggestion?

It's that time of year again... Xcode 15 is approaching (currently RC)

Related PRs:
https://github.com/conan-io/conan/pull/12064
https://github.com/conan-io/conan/pull/10797
https://github.com/conan-io/conan/pull/9642

Related issues:
https://github.com/conan-io/conan/issues/12063
https://github.com/conan-io/conan/issues/10509
https://github.com/conan-io/conan/issues/9641

XCode 15 RC reports compiler version as "15.0".

> Apple clang version 15.0.0 (clang-1500.0.40.1)

I'll create a PR later

In conan 1.47 the condition was lifted that only major number must match; now the major one has changed again.


### Have you read the CONTRIBUTING guide?

- [X] I've read the CONTRIBUTING guide


Discussion:
Thanks for the suggestion.
Adding this to the 2.0.10 milestone, the PR should target ``release/2.0`` branch, thanks for offering to contribute it!

One of the most important things to check is if they are changing any compiler default, like the ``cppstd``, it would be good to explicitly comment it in the PR.
[clang-1500.0.40.1.txt](https://github.com/conan-io/conan/files/12365609/clang-1500.0.40.1.txt)

```c++
#define __cplusplus 199711L  // c++98
#define __cpp_exceptions 199711L // c++98
#define __cpp_impl_destroying_delete 201806L  // c++20
#define __cpp_named_character_escapes 202207L // c++23
#define __cpp_rtti 199711L // c++98
#define __cpp_threadsafe_static_init 200806L  // c++11
```

```bash
echo '' | ./clang -x c++ --std=abc -E -
error: invalid value 'abc' in '--std=abc'
note: use 'c++98' or 'c++03' for 'ISO C++ 1998 with amendments' standard
note: use 'gnu++98' or 'gnu++03' for 'ISO C++ 1998 with amendments and GNU extensions' standard
note: use 'c++11' for 'ISO C++ 2011 with amendments' standard
note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard
note: use 'c++14' for 'ISO C++ 2014 with amendments' standard
note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard
note: use 'c++17' for 'ISO C++ 2017 with amendments' standard
note: use 'gnu++17' for 'ISO C++ 2017 with amendments and GNU extensions' standard
note: use 'c++20' for 'ISO C++ 2020 DIS' standard
note: use 'gnu++20' for 'ISO C++ 2020 DIS with GNU extensions' standard
note: use 'c++2b' for 'Working draft for ISO C++ 2023 DIS' standard
note: use 'gnu++2b' for 'Working draft for ISO C++ 2023 DIS with GNU extensions' standard
```

Resolving patch:
diff --git a/conans/client/conf/__init__.py b/conans/client/conf/__init__.py
--- a/conans/client/conf/__init__.py
+++ b/conans/client/conf/__init__.py
@@ -16,31 +16,39 @@
                     "11.0", "11.1", "11.2", "11.3", "11.4", "12.0", "12.1", "12.2", "12.3", "12.4",
                     "13.0", "13.1", "13.2", "13.3", "13.4", "13.5", "13.6", "13.7",
                     "14.0", "14.1", "14.2", "14.3", "14.4", "14.5", "14.6", "14.7", "14.8",
-                    "15.0", "15.1", "15.2", "15.3", "15.4", "15.5", "15.6", "16.0", "16.1"]
+                    "15.0", "15.1", "15.2", "15.3", "15.4", "15.5", "15.6", "16.0", "16.1",
+                    "16.2", "16.3", "16.4", "16.5", "16.6", "17.0"]
         sdk: ["iphoneos", "iphonesimulator"]
         sdk_version: [null, "11.3", "11.4", "12.0", "12.1", "12.2", "12.4",
                         "13.0", "13.1", "13.2", "13.4", "13.5", "13.6", "13.7",
-                        "14.0", "14.1", "14.2", "14.3", "14.4", "14.5", "15.0", "15.2", "15.4", "15.5", "16.0", "16.1"]
+                        "14.0", "14.1", "14.2", "14.3", "14.4", "14.5", "15.0", "15.2", "15.4",
+                        "15.5", "16.0", "16.1", "16.2", "16.4", "17.0"]
     watchOS:
         version: ["4.0", "4.1", "4.2", "4.3", "5.0", "5.1", "5.2", "5.3", "6.0", "6.1", "6.2",
-                    "7.0", "7.1", "7.2", "7.3", "7.4", "7.5", "7.6", "8.0", "8.1", "8.3", "8.4", "8.5", "8.6", "8.7", "9.0", "9.1"]
+                    "7.0", "7.1", "7.2", "7.3", "7.4", "7.5", "7.6", "8.0", "8.1", "8.3", "8.4",
+                    "8.5", "8.6", "8.7", "9.0", "9.1", "9.2", "9.3", "9.4", "9.5", "9.6", "10.0"]
         sdk: ["watchos", "watchsimulator"]
         sdk_version: [null, "4.3", "5.0", "5.1", "5.2", "5.3", "6.0", "6.1", "6.2",
-                        "7.0", "7.1", "7.2", "7.4", "8.0", "8.0.1", "8.3", "8.5", "9.0", "9.1"]
+                        "7.0", "7.1", "7.2", "7.4", "8.0", "8.0.1", "8.3", "8.5", "9.0", "9.1",
+                        "9.4", "10.0"]
     tvOS:
         version: ["11.0", "11.1", "11.2", "11.3", "11.4", "12.0", "12.1", "12.2", "12.3", "12.4",
-                    "13.0", "13.2", "13.3", "13.4", "14.0", "14.2", "14.3", "14.4", "14.5", "14.6", "14.7",
-                    "15.0", "15.1", "15.2", "15.3", "15.4", "15.5", "15.6", "16.0", "16.1"]
+                    "13.0", "13.2", "13.3", "13.4", "14.0", "14.2", "14.3", "14.4", "14.5",
+                    "14.6", "14.7", "15.0", "15.1", "15.2", "15.3", "15.4", "15.5", "15.6",
+                    "16.0", "16.1", "16.2", "16.3", "16.4", "16.5", "16.6", "17.0"]
         sdk: ["appletvos", "appletvsimulator"]
         sdk_version: [null, "11.3", "11.4", "12.0", "12.1", "12.2", "12.4",
-                        "13.0", "13.1", "13.2", "13.4", "14.0", "14.2", "14.3", "14.5", "15.0", "15.2", "15.4", "16.0", "16.1"]
+                        "13.0", "13.1", "13.2", "13.4", "14.0", "14.2", "14.3", "14.5", "15.0",
+                        "15.2", "15.4", "16.0", "16.1", "16.4", "17.0"]
     visionOS:
         version: ["1.0"]
         sdk: ["xros", "xrsimulator"]
         sdk_version: [null, "1.0"]
     Macos:
-        version: [null, "10.6", "10.7", "10.8", "10.9", "10.10", "10.11", "10.12", "10.13", "10.14", "10.15", "11.0", "12.0", "13.0"]
-        sdk_version: [null, "10.13", "10.14", "10.15", "11.0", "11.1", "11.3", "12.0", "12.1", "12.3", "13.0", "13.1"]
+        version: [null, "10.6", "10.7", "10.8", "10.9", "10.10", "10.11", "10.12", "10.13",
+                    "10.14", "10.15", "11.0", "12.0", "13.0", "14.0"]
+        sdk_version: [null, "10.13", "10.14", "10.15", "11.0", "11.1", "11.3", "12.0", "12.1",
+                        "12.3", "13.0", "13.1", "13.3", "14.0"]
         subsystem:
             null:
             catalyst:


Test patch:
diff --git a/conans/test/unittests/client/build/cpp_std_flags_test.py b/conans/test/unittests/client/build/cpp_std_flags_test.py
--- a/conans/test/unittests/client/build/cpp_std_flags_test.py
+++ b/conans/test/unittests/client/build/cpp_std_flags_test.py
@@ -214,6 +214,13 @@ def test_apple_clang_cppstd_flags(self):
         self.assertEqual(_make_cppstd_flag("apple-clang", "14.0", "23"), "-std=c++2b")
         self.assertEqual(_make_cppstd_flag("apple-clang", "14.0", "gnu23"), "-std=gnu++2b")
 
+        self.assertEqual(_make_cppstd_flag("apple-clang", "15.0", "17"), "-std=c++17")
+        self.assertEqual(_make_cppstd_flag("apple-clang", "15.0", "gnu17"), "-std=gnu++17")
+        self.assertEqual(_make_cppstd_flag("apple-clang", "15.0", "20"), "-std=c++20")
+        self.assertEqual(_make_cppstd_flag("apple-clang", "15.0", "gnu20"), "-std=gnu++20")
+        self.assertEqual(_make_cppstd_flag("apple-clang", "15.0", "23"), "-std=c++2b")
+        self.assertEqual(_make_cppstd_flag("apple-clang", "15.0", "gnu23"), "-std=gnu++2b")
+
     def test_apple_clang_cppstd_defaults(self):
         self.assertEqual(_make_cppstd_default("apple-clang", "2"), "gnu98")
         self.assertEqual(_make_cppstd_default("apple-clang", "3"), "gnu98")
@@ -228,6 +235,7 @@ def test_apple_clang_cppstd_defaults(self):
         self.assertEqual(_make_cppstd_default("apple-clang", "12"), "gnu98")
         self.assertEqual(_make_cppstd_default("apple-clang", "13"), "gnu98")
         self.assertEqual(_make_cppstd_default("apple-clang", "14"), "gnu98")
+        self.assertEqual(_make_cppstd_default("apple-clang", "15"), "gnu98")
 
     def test_visual_cppstd_flags(self):
         self.assertEqual(_make_cppstd_flag("msvc", "170", "11"), None)