[cfe-commits] [patch] Fix -Wlarge-by-value-copy option in the driver.

Chandler Carruth chandlerc at google.com
Thu May 3 15:02:57 PDT 2012


On Thu, May 3, 2012 at 2:21 PM, Jean-Daniel Dupas <devlists at shadowlab.org>wrote:

> Hi,
>
> Recent change in CC1Options and Options definition broke the
> '-Wlarge-by-value-copy' argument. When trying to using it, clang cc1 failed
> with the following message:
>
> error: unknown argument: '-Wlarge-by-value-copy'
>
> Is this attached patch OK ?
>

Yes, but the test case could be cleaned up.

--- /dev/null
+++ b/test/Driver/Wlarge-by-value-copy_opts.cpp

I would put this in a generic test for warning options... If there isn't
one yet: test/Driver/warning-options.cpp

@@ -0,0 +1,4 @@
+// RUN: %clang -### -Wlarge-by-value-copy %s 2>&1 | FileCheck
-check-prefix=WRITE-STRINGS %s
+// WRITE-STRINGS: -Wlarge-by-value-copy=64

WRITE-STRINGS have nothing to do with this test? Please use a more
descriptive prefix rather than just copy/pasting? =D

+// RUN: %clang -### -Wlarge-by-value-copy=128 %s 2>&1 | FileCheck
-check-prefix=WRITE-STRINGS2 %s
+// WRITE-STRINGS2: -Wlarge-by-value-copy=128
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120503/e223c436/attachment.html>


More information about the cfe-commits mailing list