Skip to content

Commit ad84a1c

Browse files
committed
Add clang-3.4
1 parent 37e6474 commit ad84a1c

File tree

4 files changed

+64
-22
lines changed

4 files changed

+64
-22
lines changed

.github/workflows/linux.yml

+55-16
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ jobs:
1010
runs-on: ubuntu-22.04
1111
strategy:
1212
matrix:
13-
cxx: [g++-4.9, g++-11, clang++-11]
13+
cxx: [g++-4.9, g++-11, clang++-3.4, clang++-11]
1414
build_type: [Debug, Release]
1515
std: [11]
1616
shared: [""]
1717
include:
1818
- cxx: g++-4.9
19+
- cxx: clang++-3.4
1920
- cxx: g++-11
2021
build_type: Debug
2122
std: 14
@@ -66,29 +67,65 @@ jobs:
6667
# https://launchpad.net/ubuntu/xenial/amd64/g++-4.9/4.9.3-13ubuntu2
6768
wget --no-verbose \
6869
http://launchpadlibrarian.net/230069137/libmpfr4_3.1.3-2_amd64.deb \
69-
http://launchpadlibrarian.net/253728314/gcc-4.9-base_4.9.3-13ubuntu2_amd64.deb \
70-
http://launchpadlibrarian.net/445345919/gcc-5-base_5.4.0-6ubuntu1~16.04.12_amd64.deb \
71-
http://launchpadlibrarian.net/253728399/cpp-4.9_4.9.3-13ubuntu2_amd64.deb \
7270
http://launchpadlibrarian.net/253728424/libasan1_4.9.3-13ubuntu2_amd64.deb \
7371
http://launchpadlibrarian.net/445346135/libubsan0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
7472
http://launchpadlibrarian.net/445346112/libcilkrts5_5.4.0-6ubuntu1~16.04.12_amd64.deb \
7573
http://launchpadlibrarian.net/253728426/libgcc-4.9-dev_4.9.3-13ubuntu2_amd64.deb \
76-
http://launchpadlibrarian.net/253728404/gcc-4.9_4.9.3-13ubuntu2_amd64.deb \
7774
http://launchpadlibrarian.net/253728432/libstdc++-4.9-dev_4.9.3-13ubuntu2_amd64.deb \
75+
http://launchpadlibrarian.net/253728314/gcc-4.9-base_4.9.3-13ubuntu2_amd64.deb \
76+
http://launchpadlibrarian.net/445345919/gcc-5-base_5.4.0-6ubuntu1~16.04.12_amd64.deb \
77+
http://launchpadlibrarian.net/253728399/cpp-4.9_4.9.3-13ubuntu2_amd64.deb \
78+
http://launchpadlibrarian.net/253728404/gcc-4.9_4.9.3-13ubuntu2_amd64.deb \
7879
http://launchpadlibrarian.net/253728401/g++-4.9_4.9.3-13ubuntu2_amd64.deb
79-
sudo dpkg -i libmpfr4_3.1.3-2_amd64.deb \
80-
gcc-4.9-base_4.9.3-13ubuntu2_amd64.deb \
81-
gcc-5-base_5.4.0-6ubuntu1~16.04.12_amd64.deb \
82-
cpp-4.9_4.9.3-13ubuntu2_amd64.deb \
80+
sudo dpkg -i \
81+
libmpfr4_3.1.3-2_amd64.deb \
8382
libasan1_4.9.3-13ubuntu2_amd64.deb \
8483
libubsan0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
8584
libcilkrts5_5.4.0-6ubuntu1~16.04.12_amd64.deb \
8685
libgcc-4.9-dev_4.9.3-13ubuntu2_amd64.deb \
87-
gcc-4.9_4.9.3-13ubuntu2_amd64.deb \
8886
libstdc++-4.9-dev_4.9.3-13ubuntu2_amd64.deb \
87+
gcc-4.9-base_4.9.3-13ubuntu2_amd64.deb \
88+
gcc-5-base_5.4.0-6ubuntu1~16.04.12_amd64.deb \
89+
cpp-4.9_4.9.3-13ubuntu2_amd64.deb \
90+
gcc-4.9_4.9.3-13ubuntu2_amd64.deb \
8991
g++-4.9_4.9.3-13ubuntu2_amd64.deb
9092
if: ${{ matrix.cxx == 'g++-4.9' }}
9193

94+
- name: Install Clang 3.4
95+
run: |
96+
sudo apt update
97+
sudo apt install libtinfo5 libobjc4
98+
# https://code.launchpad.net/ubuntu/xenial/amd64/clang-3.4/1:3.4.2-16ubuntu3
99+
wget --no-verbose \
100+
http://launchpadlibrarian.net/230019046/libffi6_3.2.1-4_amd64.deb \
101+
http://launchpadlibrarian.net/227310349/libllvm3.4_3.4.2-16ubuntu3_amd64.deb \
102+
http://launchpadlibrarian.net/445346109/libasan2_5.4.0-6ubuntu1~16.04.12_amd64.deb \
103+
http://launchpadlibrarian.net/445346135/libubsan0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
104+
http://launchpadlibrarian.net/445346112/libcilkrts5_5.4.0-6ubuntu1~16.04.12_amd64.deb \
105+
http://launchpadlibrarian.net/445346128/libmpx0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
106+
http://launchpadlibrarian.net/445346113/libgcc-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
107+
http://launchpadlibrarian.net/445346131/libstdc++-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
108+
http://launchpadlibrarian.net/445346022/libobjc-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
109+
http://launchpadlibrarian.net/227310343/libclang1-3.4_3.4.2-16ubuntu3_amd64.deb \
110+
http://launchpadlibrarian.net/227310340/libclang-common-3.4-dev_3.4.2-16ubuntu3_amd64.deb \
111+
http://launchpadlibrarian.net/445345919/gcc-5-base_5.4.0-6ubuntu1~16.04.12_amd64.deb \
112+
http://launchpadlibrarian.net/227310332/clang-3.4_3.4.2-16ubuntu3_amd64.deb
113+
sudo dpkg -i \
114+
libffi6_3.2.1-4_amd64.deb \
115+
libllvm3.4_3.4.2-16ubuntu3_amd64.deb \
116+
libasan2_5.4.0-6ubuntu1~16.04.12_amd64.deb \
117+
libubsan0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
118+
libcilkrts5_5.4.0-6ubuntu1~16.04.12_amd64.deb \
119+
libmpx0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
120+
libgcc-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
121+
libstdc++-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
122+
libobjc-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
123+
libclang1-3.4_3.4.2-16ubuntu3_amd64.deb \
124+
libclang-common-3.4-dev_3.4.2-16ubuntu3_amd64.deb \
125+
gcc-5-base_5.4.0-6ubuntu1~16.04.12_amd64.deb \
126+
clang-3.4_3.4.2-16ubuntu3_amd64.deb
127+
if: ${{ matrix.cxx == 'clang++-3.4' }}
128+
92129
- name: Add repositories for newer GCC
93130
run: |
94131
sudo apt-add-repository ppa:ubuntu-toolchain-r/test
@@ -102,9 +139,9 @@ jobs:
102139
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt
103140
sudo sed -i 's~http://azure.archive.ubuntu.com/ubuntu/~mirror+file:/etc/apt/mirrors.txt~' /etc/apt/sources.list
104141
105-
- name: Create Build Environment
142+
- name: Create build environment
106143
run: |
107-
sudo apt update --allow-unauthenticated
144+
sudo apt update
108145
${{matrix.install}}
109146
sudo apt install locales-all
110147
cmake -E make_directory ${{runner.workspace}}/build
@@ -115,10 +152,12 @@ jobs:
115152
CXX: ${{matrix.cxx}}
116153
CXXFLAGS: ${{matrix.cxxflags}}
117154
run: |
118-
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.fuzz}} ${{matrix.shared}} \
119-
-DCMAKE_CXX_STANDARD=${{matrix.std}} -DFMT_DOC=OFF \
120-
-DCMAKE_CXX_VISIBILITY_PRESET=hidden -DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
121-
-DFMT_PEDANTIC=ON -DFMT_WERROR=ON $GITHUB_WORKSPACE
155+
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
156+
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
157+
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
158+
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
159+
-DFMT_DOC=OFF -DFMT_PEDANTIC=ON -DFMT_WERROR=ON \
160+
${{matrix.fuzz}} ${{matrix.shared}} $GITHUB_WORKSPACE
122161
123162
- name: Build
124163
working-directory: ${{runner.workspace}}/build

include/fmt/format.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ using is_integer =
705705

706706
#if defined(FMT_USE_FLOAT128)
707707
// Use the provided definition.
708-
#elif FMT_CLANG_VERSION && FMT_HAS_INCLUDE(<quadmath.h>)
708+
#elif FMT_CLANG_VERSION >= 309 && FMT_HAS_INCLUDE(<quadmath.h>)
709709
# define FMT_USE_FLOAT128 1
710710
#elif FMT_GCC_VERSION && defined(_GLIBCXX_USE_FLOAT128) && \
711711
!defined(__STRICT_ANSI__)

include/fmt/ranges.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -774,13 +774,13 @@ struct formatter<
774774
: formatter<detail::all<typename T::container_type>, Char> {
775775
using all = detail::all<typename T::container_type>;
776776
template <typename FormatContext>
777-
auto format(const T& t, FormatContext& ctx) const -> decltype(ctx.out()) {
777+
auto format(const T& value, FormatContext& ctx) const -> decltype(ctx.out()) {
778778
struct getter : T {
779-
static auto get(const T& t) -> all {
780-
return {t.*(&getter::c)}; // Access c through the derived class.
779+
static auto get(const T& v) -> all {
780+
return {v.*(&getter::c)}; // Access c through the derived class.
781781
}
782782
};
783-
return formatter<all>::format(getter::get(t), ctx);
783+
return formatter<all>::format(getter::get(value), ctx);
784784
}
785785
};
786786

test/ranges-test.cc

+4-1
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,12 @@ auto get(const tuple_like& t) noexcept -> decltype(t.get<N>()) {
232232
return t.get<N>();
233233
}
234234

235+
// https://github.com/llvm/llvm-project/issues/39218
236+
FMT_PRAGMA_CLANG(diagnostic ignored "-Wmismatched-tags")
237+
235238
namespace std {
236239
template <>
237-
struct tuple_size<tuple_like> : std::integral_constant<size_t, 2> {};
240+
struct tuple_size<tuple_like> : public std::integral_constant<size_t, 2> {};
238241

239242
template <size_t N> struct tuple_element<N, tuple_like> {
240243
using type = decltype(std::declval<tuple_like>().get<N>());

0 commit comments

Comments
 (0)