[clang-tools-extra] Include cmath to fix build error on mac os 10.14 (PR #88665)

via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 14 10:55:04 PDT 2024


https://github.com/Zentrik updated https://github.com/llvm/llvm-project/pull/88665

>From cdd250c837b9f1b2c35fa12b170c342f6d1ce295 Mon Sep 17 00:00:00 2001
From: Zentrik <Zentrik at users.noreply.github.com>
Date: Sun, 14 Apr 2024 17:28:18 +0100
Subject: [PATCH 1/2] Include cmath to fix build error on mac os 10.14

---
 clang-tools-extra/clang-tidy/modernize/UseStdNumbersCheck.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/clang-tools-extra/clang-tidy/modernize/UseStdNumbersCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseStdNumbersCheck.cpp
index b299afd540b9a3..45a8f973486147 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseStdNumbersCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseStdNumbersCheck.cpp
@@ -35,6 +35,7 @@
 #include <string>
 #include <tuple>
 #include <utility>
+#include <cmath>
 
 namespace {
 using namespace clang::ast_matchers;

>From 8852efd6357ed1b1e5a903b620603f8be9f502af Mon Sep 17 00:00:00 2001
From: Zentrik <Zentrik at users.noreply.github.com>
Date: Sun, 14 Apr 2024 18:54:56 +0100
Subject: [PATCH 2/2] Format

---
 clang-tools-extra/clang-tidy/modernize/UseStdNumbersCheck.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang-tools-extra/clang-tidy/modernize/UseStdNumbersCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseStdNumbersCheck.cpp
index 45a8f973486147..1548fc454cfb37 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseStdNumbersCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseStdNumbersCheck.cpp
@@ -29,13 +29,13 @@
 #include "llvm/Support/FormatVariadic.h"
 #include "llvm/Support/MathExtras.h"
 #include <array>
+#include <cmath>
 #include <cstdint>
 #include <cstdlib>
 #include <initializer_list>
 #include <string>
 #include <tuple>
 #include <utility>
-#include <cmath>
 
 namespace {
 using namespace clang::ast_matchers;



More information about the cfe-commits mailing list