[clang] 49f7bc9 - [hip] Remove `-Werror=format-nonliteral`
Michael Liao via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 23 08:02:43 PST 2020
Author: Michael Liao
Date: 2020-01-23T11:02:11-05:00
New Revision: 49f7bc9e1e50eb8f6e065f97585b3bf0bcc23d5c
URL: https://github.com/llvm/llvm-project/commit/49f7bc9e1e50eb8f6e065f97585b3bf0bcc23d5c
DIFF: https://github.com/llvm/llvm-project/commit/49f7bc9e1e50eb8f6e065f97585b3bf0bcc23d5c.diff
LOG: [hip] Remove `-Werror=format-nonliteral`
Summary:
- It won't distinguish host and device code and trigger compilation
failure on irrelevant code.
Reviewers: sameerds, yaxunl
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73224
Added:
Modified:
clang/lib/Driver/ToolChains/HIP.cpp
clang/test/Driver/hip-printf.hip
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/HIP.cpp b/clang/lib/Driver/ToolChains/HIP.cpp
index 4772a6fb6b10..7039ddeabd57 100644
--- a/clang/lib/Driver/ToolChains/HIP.cpp
+++ b/clang/lib/Driver/ToolChains/HIP.cpp
@@ -425,7 +425,6 @@ Tool *HIPToolChain::buildLinker() const {
void HIPToolChain::addClangWarningOptions(ArgStringList &CC1Args) const {
HostTC.addClangWarningOptions(CC1Args);
- CC1Args.push_back("-Werror=format-nonliteral");
}
ToolChain::CXXStdlibType
diff --git a/clang/test/Driver/hip-printf.hip b/clang/test/Driver/hip-printf.hip
index 2df344f8fb2e..ada6c651ddb7 100644
--- a/clang/test/Driver/hip-printf.hip
+++ b/clang/test/Driver/hip-printf.hip
@@ -6,4 +6,4 @@
// RUN: %s 2>&1 | FileCheck %s
// CHECK: [[CLANG:".*clang.*"]] "-cc1"
-// CHECK-SAME: "-Werror=format-nonliteral"
+// CHECK-NOT: "-Werror=format-nonliteral"
More information about the cfe-commits
mailing list