[PATCH] D32341: Fix a bug that warnings generated with -M or -MM flags
Yuka Takahashi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 22 06:08:01 PDT 2017
yamaguchi updated this revision to Diff 96283.
yamaguchi added a comment.
Fixed typo.
https://reviews.llvm.org/D32341
Files:
lib/Driver/ToolChains/Clang.cpp
test/Driver/m_and_mm.c
Index: test/Driver/m_and_mm.c
===================================================================
--- test/Driver/m_and_mm.c
+++ test/Driver/m_and_mm.c
@@ -1,3 +1,7 @@
// RUN: %clang -### \
// RUN: -M -MM %s 2> %t
// RUN: not grep '"-sys-header-deps"' %t
+
+// RUN: %clang -M -MM %s 2> %t
+// RUN: not grep "warning" %t
+#warning "This warning shouldn't show up with -M and -MM"
Index: lib/Driver/ToolChains/Clang.cpp
===================================================================
--- lib/Driver/ToolChains/Clang.cpp
+++ lib/Driver/ToolChains/Clang.cpp
@@ -980,6 +980,7 @@
DepTarget = Args.MakeArgString(llvm::sys::path::filename(P));
}
+ CmdArgs.push_back("-w");
CmdArgs.push_back("-MT");
SmallString<128> Quoted;
QuoteTarget(DepTarget, Quoted);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32341.96283.patch
Type: text/x-patch
Size: 801 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170422/67812972/attachment.bin>
More information about the cfe-commits
mailing list