[all-commits] [llvm/llvm-project] 55d5ba: [NFC] Fix compilation in C++20 mode with GCC 12
Ilya Biryukov via All-commits
all-commits at lists.llvm.org
Wed Jan 3 08:02:32 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 55d5ba905da0db55282dd3985761ddf3dd452fd1
https://github.com/llvm/llvm-project/commit/55d5ba905da0db55282dd3985761ddf3dd452fd1
Author: Ilya Biryukov <ibiryukov at google.com>
Date: 2024-01-03 (Wed, 03 Jan 2024)
Changed paths:
M clang/lib/Sema/SemaChecking.cpp
Log Message:
-----------
[NFC] Fix compilation in C++20 mode with GCC 12
I ran into the following compiler error when trying to build with GCC 12
and `-DCMAKE_CXX_STANDARD=20`:
```
llvm-project/clang/lib/Sema/SemaChecking.cpp:16690:16: required from here
/usr/include/c++/12/type_traits:971:30: error: default member initializer for '{anonymous}::SequenceChecker::Usage::UsageExpr' required before the end of its enclosing class
```
The error seems correct, GCC just instantiates the `SmallDenseMap`
early and detects it. Clang does not, but that's an acceptable
implementation difference as far as the standard is concerned.
Move constructor outside the class to avoid this problem.
More information about the All-commits
mailing list