Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion swift/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ IndentWidth: 2
SortIncludes: false
AllowShortIfStatementsOnASingleLine: WithoutElse
AlwaysBreakBeforeMultilineStrings: false
Standard: c++17
Standard: c++20
2 changes: 1 addition & 1 deletion swift/extractor/infra/file/BUILD.bazel
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be we don't need the workaround for https://cplusplus.github.io/LWG/issue3657 any more in C++20. I do hope all C++17 STL defects to be fixed in C++20.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a recent defect (opened 2022-01-02, resolved 2022-02-10). I would guess at least some of our compilers predate that. That said, we can certainly give it a try in a separate PR (so we're not adding and removing commits here to experiment). Do we have a tracking issue already?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how the C++ standard redefines the concept of "recent" 😉

I've opened https://github.com/github/codeql-c-team/issues/1777 to track this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, I agree that doing it in a separate PR is more sensible.

Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down