From 5952a729df3e2724e2209e3fa005c1d3a6d6d032 Mon Sep 17 00:00:00 2001 From: Alexandre Boulgakov Date: Thu, 8 Jun 2023 13:10:43 +0100 Subject: [PATCH] Build: Bump build mode to C++20. --- .bazelrc | 2 +- swift/.clang-format | 2 +- swift/extractor/infra/file/BUILD.bazel | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bazelrc b/.bazelrc index a304a7b0e1a2..e0ab5a343357 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,3 +1,3 @@ -build --repo_env=CC=clang --repo_env=CXX=clang++ --cxxopt="-std=c++17" +build --repo_env=CC=clang --repo_env=CXX=clang++ --cxxopt="-std=c++20" try-import %workspace%/local.bazelrc diff --git a/swift/.clang-format b/swift/.clang-format index 96d2febc1c2c..ca0a3afd986d 100644 --- a/swift/.clang-format +++ b/swift/.clang-format @@ -4,4 +4,4 @@ IndentWidth: 2 SortIncludes: false AllowShortIfStatementsOnASingleLine: WithoutElse AlwaysBreakBeforeMultilineStrings: false -Standard: c++17 +Standard: c++20 diff --git a/swift/extractor/infra/file/BUILD.bazel b/swift/extractor/infra/file/BUILD.bazel index 65cfea339950..d14a28ce622b 100644 --- a/swift/extractor/infra/file/BUILD.bazel +++ b/swift/extractor/infra/file/BUILD.bazel @@ -24,7 +24,7 @@ genrule( # see if https://cplusplus.github.io/LWG/issue3657 is fixed with the current compiler or not # if fixed, PathHash.h.workaround will not compile cmd = "\n".join([ - "if clang -c -x c++ -std=c++17 -Wno-pragma-once-outside-header \\", + "if clang -c -x c++ -std=c++20 -Wno-pragma-once-outside-header \\", " $(rootpath PathHash.h.workaround) -o /dev/null &> /dev/null; then", " cp $(rootpath PathHash.h.workaround) $@", "else",