Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Ben Craig via cfe-commits
bcraig added a subscriber: bcraig. bcraig added a comment. In http://reviews.llvm.org/D18271#381744, @thakis wrote: > FWIW we don't currently use this warning on Chromium because it's way to > noisy. So something like this looks like a great change to me. > > dblaikie, are you aware of any codeb

Re: [PATCH] D18271: Avoid -Wshadow warnings about constructor parameters named after fields

2016-03-23 Thread Ben Craig via cfe-commits
bcraig added a subscriber: mclow.lists. bcraig added a comment. > > Not dblaikie, but I've used the GCC version of -Wshadow on reasonably large > > code bases before. The ctor pattern that this is trying to squelch was > > certainly a significant portion of the warnings, particularly when (old)

[PATCH] D15813: [libcxx] Refactoring target_info.py used by lit tests

2015-12-29 Thread Ben Craig via cfe-commits
bcraig created this revision. bcraig added reviewers: mclow.lists, jroelofs, danalbert, EricWF. bcraig added a subscriber: cfe-commits. Herald added a subscriber: emaste. This patch makes it easier to support running the lit tests for new and unusual platforms. It will break existing users that s

[libcxx] r256588 - [libcxx] Refactoring target_info.py

2015-12-29 Thread Ben Craig via cfe-commits
Author: bcraig Date: Tue Dec 29 16:21:38 2015 New Revision: 256588 URL: http://llvm.org/viewvc/llvm-project?rev=256588&view=rev Log: [libcxx] Refactoring target_info.py This patch makes it easier to support running the lit tests for new and unusual platforms. It will break existing users that set

Re: [PATCH] D15813: [libcxx] Refactoring target_info.py used by lit tests

2015-12-29 Thread Ben Craig via cfe-commits
bcraig closed this revision. bcraig added a comment. Committed as r256588. Thanks for the quick review! http://reviews.llvm.org/D15813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r256591 - [libcxx] Fixing the Linux sanitizer builds

2015-12-29 Thread Ben Craig via cfe-commits
Author: bcraig Date: Tue Dec 29 16:43:17 2015 New Revision: 256591 URL: http://llvm.org/viewvc/llvm-project?rev=256591&view=rev Log: [libcxx] Fixing the Linux sanitizer builds Modified: libcxx/trunk/test/libcxx/test/target_info.py Modified: libcxx/trunk/test/libcxx/test/target_info.py URL:

[libcxx] r256592 - [libcxx] Fixing silly mistake from last commit.

2015-12-29 Thread Ben Craig via cfe-commits
Author: bcraig Date: Tue Dec 29 16:55:55 2015 New Revision: 256592 URL: http://llvm.org/viewvc/llvm-project?rev=256592&view=rev Log: [libcxx] Fixing silly mistake from last commit. Tested on Linux x86_64 targeting Linux x86_64. Modified: libcxx/trunk/test/libcxx/test/target_info.py Modified

[libcxx] r256594 - [libcxx] Fixing the Mac / Darwin build

2015-12-29 Thread Ben Craig via cfe-commits
Author: bcraig Date: Tue Dec 29 17:01:07 2015 New Revision: 256594 URL: http://llvm.org/viewvc/llvm-project?rev=256594&view=rev Log: [libcxx] Fixing the Mac / Darwin build Modified: libcxx/trunk/test/libcxx/test/target_info.py Modified: libcxx/trunk/test/libcxx/test/target_info.py URL: http

Re: [PATCH] D15813: [libcxx] Refactoring target_info.py used by lit tests

2015-12-30 Thread Ben Craig via cfe-commits
bcraig added a comment. Apologies for the swarm of breakages this caused. Thanks for the late night (for me at least) locale fix EricWF! http://reviews.llvm.org/D15813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

Re: [PATCH] D15539: [libcxxabi] Reducing stack usage of test

2016-01-04 Thread Ben Craig via cfe-commits
bcraig added a comment. Ping. If desired, I could provide an alternative implementation where all the structs are allocated at global scope with their original padding. http://reviews.llvm.org/D15539 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D16006: [libcxxabi] Teach cxa_demangle about Hexagon's long double size

2016-01-08 Thread Ben Craig via cfe-commits
bcraig created this revision. bcraig added reviewers: howard.hinnant, logan, dsanders, rengolin. bcraig added a subscriber: cfe-commits. cxa_demangle's default size for a long double is 10 bytes. Hexagon only has an 8 byte long double though. http://reviews.llvm.org/D16006 Files: src/cxa_dem

[PATCH] D16007: [libcxxabi] Make test tolerant of uncommon floating literal demanglings

2016-01-08 Thread Ben Craig via cfe-commits
bcraig created this revision. bcraig added reviewers: howard.hinnant, logan, EricWF. bcraig added a subscriber: cfe-commits. libcxxabi uses the C99 library's %a format specifier to turn a floating point value into a hexadecimal string representation. The %a format specifier is rather loosely de

Re: [PATCH] D15539: [libcxxabi] Reducing stack usage of test

2016-01-11 Thread Ben Craig via cfe-commits
bcraig added a comment. ping http://reviews.llvm.org/D15539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16007: [libcxxabi] Make test tolerant of uncommon floating literal demanglings

2016-01-18 Thread Ben Craig via cfe-commits
bcraig added a reviewer: mclow.lists. bcraig added a comment. ping http://reviews.llvm.org/D16007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16006: [libcxxabi] Teach cxa_demangle about Hexagon's long double size

2016-01-18 Thread Ben Craig via cfe-commits
bcraig added a reviewer: mclow.lists. bcraig added a comment. ping http://reviews.llvm.org/D16006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15539: [libcxxabi] Reducing stack usage of test

2016-01-18 Thread Ben Craig via cfe-commits
bcraig added a comment. ping http://reviews.llvm.org/D15539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxxabi] r258311 - [libcxxabi] Make test tolerant of uncommon floating literal demanglings

2016-01-20 Thread Ben Craig via cfe-commits
Author: bcraig Date: Wed Jan 20 08:03:27 2016 New Revision: 258311 URL: http://llvm.org/viewvc/llvm-project?rev=258311&view=rev Log: [libcxxabi] Make test tolerant of uncommon floating literal demanglings libcxxabi uses the C99 library's %a format specifier to turn a floating point value into a h

[libcxxabi] r258313 - [libcxxabi] Teach cxa_demangle about Hexagon's long double size

2016-01-20 Thread Ben Craig via cfe-commits
Author: bcraig Date: Wed Jan 20 08:10:23 2016 New Revision: 258313 URL: http://llvm.org/viewvc/llvm-project?rev=258313&view=rev Log: [libcxxabi] Teach cxa_demangle about Hexagon's long double size cxa_demangle's default size for a long double is 10 bytes. Hexagon only has an 8 byte long double th

Re: [PATCH] D16406: [libcxx] Add appropriate 'REQUIRE' directives to tests that require en_US.UTF-8.

2016-01-21 Thread Ben Craig via cfe-commits
bcraig added a subscriber: bcraig. bcraig added a comment. LGTM, but that doesn't mean much. I suspect that there are some tests that have snuck past this sweep, but I haven't done the work to figure out which ones. I base this statement off of these search results... LOCALE_en_US_UTF_8 found

Re: [PATCH] D16408: [libcxx] Additional 'REQUIRE' directives for tests that require en_US.UTF-8.

2016-01-21 Thread Ben Craig via cfe-commits
bcraig added a comment. LGTM. May want to wait on mclow though considering the trouble I helped cause with the last one of these. http://reviews.llvm.org/D16408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D16480: [libcxx] NFC: suppress warning on systems where sizeof(int) == sizeof(long)

2016-01-22 Thread Ben Craig via cfe-commits
bcraig created this revision. bcraig added a reviewer: mclow.lists. bcraig added a subscriber: cfe-commits. The old code produced a couple of these warnings... src/string.cpp:95:11: warning: comparison of constant -2147483648 with expression of type 'long' (range [-2147483648, 2147483647]) is al

Re: [PATCH] D16480: [libcxx] NFC: suppress warning on systems where sizeof(int) == sizeof(long)

2016-01-25 Thread Ben Craig via cfe-commits
bcraig abandoned this revision. bcraig added a comment. Looks like I found an out-of-tree warning in our compiler. Sorry about the noise. Abandoning. http://reviews.llvm.org/D16480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D16544: [libcxx] Framework to allow testing of static libc++abi

2016-01-25 Thread Ben Craig via cfe-commits
bcraig created this revision. bcraig added reviewers: mclow.lists, EricWF, jroelofs. bcraig added a subscriber: cfe-commits. NOTE: related libc++abi changes are in a different patch that will be posted shortly. Tested with static libcxx and libcxxabi against custom embedded target. Tested with st

[PATCH] D16545: [libcxxabi] Enable testing for static libc++abi

2016-01-25 Thread Ben Craig via cfe-commits
bcraig created this revision. bcraig added reviewers: mclow.lists, jroelofs, EricWF. bcraig added a subscriber: cfe-commits. This change leverages framework changes made in libcxx. See those changes for more details. (http://reviews.llvm.org/D16544) Some Mac specific logic for testing against l

[PATCH] D16639: [libcxx] Limit catopen usage to unix-like OSes

2016-01-27 Thread Ben Craig via cfe-commits
bcraig created this revision. bcraig added reviewers: mclow.lists, ed, jfb, EricWF, jroelofs. bcraig added a subscriber: cfe-commits. Herald added subscribers: srhines, danalbert, tberghammer, jfb. Operating systems that are not unix-like are unlikely to have access to catopen. Instead of black-

Re: [PATCH] D16634: [libcxx] Whitelist inclusion of sysctl.h instead of blacklisting

2016-01-27 Thread Ben Craig via cfe-commits
bcraig added a comment. Added cfe-commits to subscriber list. http://reviews.llvm.org/D16634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16634: [libcxx] Whitelist inclusion of sysctl.h instead of blacklisting

2016-01-27 Thread Ben Craig via cfe-commits
bcraig marked 2 inline comments as done. bcraig added a comment. http://reviews.llvm.org/D16634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16639: [libcxx] Limit catopen usage to unix-like OSes

2016-01-28 Thread Ben Craig via cfe-commits
bcraig updated this revision to Diff 46291. bcraig added a comment. CloudABI doesn't define __unix__, so stop blacklisting it explicitly and let the whitelist filter it out. http://reviews.llvm.org/D16639 Files: include/__config include/locale Index: include/locale ===

Re: [PATCH] D16634: [libcxx] Whitelist inclusion of sysctl.h instead of blacklisting

2016-01-28 Thread Ben Craig via cfe-commits
bcraig updated this revision to Diff 46292. bcraig added a comment. CloudABI doesn't define unix, so stop blacklisting it explicitly and let the whitelist filter it out. http://reviews.llvm.org/D16634 Files: src/thread.cpp Index: src/thread.cpp ==

Re: [PATCH] D16634: [libcxx] Whitelist inclusion of sysctl.h instead of blacklisting

2016-01-28 Thread Ben Craig via cfe-commits
bcraig added a comment. I plan on submitting this tomorrow morning (my time) so that I have lots of time to monitor build failures. http://reviews.llvm.org/D16634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[libcxx] r259193 - [libcxx] Whitelist inclusion of sysctl.h instead of blacklisting

2016-01-29 Thread Ben Craig via cfe-commits
Author: bcraig Date: Fri Jan 29 07:53:23 2016 New Revision: 259193 URL: http://llvm.org/viewvc/llvm-project?rev=259193&view=rev Log: [libcxx] Whitelist inclusion of sysctl.h instead of blacklisting Instead of excluding all known operating systems that are not derived from BSD, I now include all o

Re: [PATCH] D14619: [PATCH] clang-tidy checker for nothrow copy constructible exception objects

2015-11-12 Thread Ben Craig via cfe-commits
bcraig added a subscriber: bcraig. bcraig added a comment. I would love to see a test case with dynamic allocation. Something along the following... struct Allocates { int *x; Allocates() : x(new int(0)) {} Allocates(const Allocates &other) : x(new int(*other.x)) {} }; ... and then the

Re: [PATCH] D14619: [PATCH] clang-tidy checker for nothrow copy constructible exception objects

2015-11-12 Thread Ben Craig via cfe-commits
bcraig added a comment. Looks good to me. http://reviews.llvm.org/D14619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14506: Porting shouldVisitImplicitCode to DataRecursiveASTVisitor.

2015-11-16 Thread Ben Craig via cfe-commits
bcraig added a comment. Ping. Note that the test is basically a copy / paste job, and the new code in DataRecursiveASTVisitor.h is a very direct translation from the 'regular' RecursiveASTVisitor.h. http://reviews.llvm.org/D14506 ___ cfe-commits

[PATCH] D14779: Adding checker to detect excess padding in records

2015-11-18 Thread Ben Craig via cfe-commits
bcraig created this revision. bcraig added reviewers: zaks.anna, jordan_rose, xazax.hun. bcraig added a subscriber: cfe-commits. The intent of this checker is to generate a report for any class / structure that could reduce its padding by reordering the fields. This results in a very noisy chec

Re: [PATCH] D14779: Adding checker to detect excess padding in records

2015-11-18 Thread Ben Craig via cfe-commits
bcraig added a comment. In http://reviews.llvm.org/D14779#292066, @zaks.anna wrote: > > I may be mistaken, but this check looks more appropriate for Clang-tidy. > > > This is a syntactic check. Both clang-tidy as well as the clang static > analyzer contain this type of checks. If we move all syn

Re: [PATCH] D14779: Adding checker to detect excess padding in records

2015-11-19 Thread Ben Craig via cfe-commits
bcraig added a comment. In http://reviews.llvm.org/D14779#292513, @zaks.anna wrote: > This is a partial review. I did not look at the padding calculations closely. > > Have you run this over codebases other than clang? Are there any false > positives? I ran this over a large C code base, then

Re: [PATCH] D14779: Adding checker to detect excess padding in records

2015-11-19 Thread Ben Craig via cfe-commits
bcraig updated this revision to Diff 40659. bcraig added a comment. Addressed the bulk of Anna's review comments. http://reviews.llvm.org/D14779 Files: lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/PaddingChecker.cpp test/

Re: [PATCH] D14779: Adding checker to detect excess padding in records

2015-11-19 Thread Ben Craig via cfe-commits
bcraig marked 15 inline comments as done. bcraig added a comment. http://reviews.llvm.org/D14779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14779: Adding checker to detect excess padding in records

2015-11-19 Thread Ben Craig via cfe-commits
bcraig marked an inline comment as done. bcraig added a comment. In http://reviews.llvm.org/D14779#293236, @zaks.anna wrote: > > I have seen plenty of structures where the specific layout was important > > and couldn't be changed. > > > Can you give specific examples of these? Can we develop heu

Re: [PATCH] D14779: Adding checker to detect excess padding in records

2015-11-19 Thread Ben Craig via cfe-commits
bcraig added a comment. In http://reviews.llvm.org/D14779#293339, @zaks.anna wrote: > > can be suppressed without breaking ABI by adding explicit padding members. > > > We should convey the suppression mechanism as part of the diagnostic. I can make the diagnostic longer. Alternatively, is the

Re: [PATCH] D14779: Adding checker to detect excess padding in records

2015-11-20 Thread Ben Craig via cfe-commits
bcraig updated the summary for this revision. bcraig updated this revision to Diff 40818. bcraig added a comment. Adding a test to validate non-trivial message components. Adding recommendations to the diagnostic on how to fix and / or suppress the generated report. Changing default padding allow

Re: [PATCH] D14506: Porting shouldVisitImplicitCode to DataRecursiveASTVisitor.

2015-11-24 Thread Ben Craig via cfe-commits
bcraig abandoned this revision. bcraig added a comment. Largely supplanted by r253958 http://reviews.llvm.org/D14506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14779: Adding checker to detect excess padding in records

2015-12-11 Thread Ben Craig via cfe-commits
bcraig marked 7 inline comments as done. bcraig added a comment. Somehow, I thought I was waiting on Anna, but I missed the Dec 1 update during the Thanksgiving break, and nothing was blocking me. An updated patch should be posted soon. In http://reviews.llvm.org/D14779#299895, @zaks.anna wrot

Re: [PATCH] D14779: Adding checker to detect excess padding in records

2015-12-11 Thread Ben Craig via cfe-commits
bcraig updated this revision to Diff 42524. bcraig marked 3 inline comments as done. bcraig added a comment. Anna Zaks last round of review requests. http://reviews.llvm.org/D14779 Files: lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer

Re: [PATCH] D14779: Adding checker to detect excess padding in records

2015-12-14 Thread Ben Craig via cfe-commits
bcraig marked 3 inline comments as done. bcraig added a comment. In http://reviews.llvm.org/D14779#309170, @zaks.anna wrote: > With respect to the issues this checker found, I suggest submitting patches > for the clang issues that can be fixed. Can the x-macro case be suppressed > with the reco

Re: [PATCH] D14779: Adding checker to detect excess padding in records

2015-12-14 Thread Ben Craig via cfe-commits
bcraig updated this revision to Diff 42742. bcraig marked an inline comment as done. http://reviews.llvm.org/D14779 Files: lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/PaddingChecker.cpp test/Analysis/padding_c.c test/Ana

Re: [PATCH] D14779: Adding checker to detect excess padding in records

2015-12-14 Thread Ben Craig via cfe-commits
bcraig marked 2 inline comments as done. bcraig added a comment. http://reviews.llvm.org/D14779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r255545 - [PATCH] Adding checker to detect excess padding in records

2015-12-14 Thread Ben Craig via cfe-commits
Author: bcraig Date: Mon Dec 14 15:38:59 2015 New Revision: 255545 URL: http://llvm.org/viewvc/llvm-project?rev=255545&view=rev Log: [PATCH] Adding checker to detect excess padding in records The intent of this checker is to generate a report for any class / structure that could reduce its paddin

Re: [PATCH] D14779: Adding checker to detect excess padding in records

2015-12-14 Thread Ben Craig via cfe-commits
bcraig closed this revision. bcraig added a comment. Submitted to r255545 http://reviews.llvm.org/D14779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r255552 - Reordering fields to reduce padding in Clang. NFC

2015-12-14 Thread Ben Craig via cfe-commits
Author: bcraig Date: Mon Dec 14 15:54:11 2015 New Revision: 22 URL: http://llvm.org/viewvc/llvm-project?rev=22&view=rev Log: Reordering fields to reduce padding in Clang. NFC Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp cfe/trunk/lib/Sema/SemaType.cpp Modified: cfe/trunk/lib/Co

[PATCH] D15539: [libcxxabi] Reducing stack usage of test

2015-12-15 Thread Ben Craig via cfe-commits
bcraig created this revision. bcraig added a reviewer: mclow.lists. bcraig added a subscriber: cfe-commits. This test has a lot of classes with large amounts of manually inserted padding in them, presumable to prevent various optimizations. The test then creates lots of these objects on the sta

Re: [PATCH] D15539: [libcxxabi] Reducing stack usage of test

2015-12-15 Thread Ben Craig via cfe-commits
bcraig added a comment. In http://reviews.llvm.org/D15539#311343, @jroelofs wrote: > Could these large padding things be related to the fact that the test is used > as a performance check for the implementation? That being said, I have no > idea who is paying attention to the numbers that come

Re: [PATCH] D15539: [libcxxabi] Reducing stack usage of test

2015-12-16 Thread Ben Craig via cfe-commits
bcraig added a subscriber: bcraig. bcraig added a comment. As an alternative, would it be acceptable to heap allocate these objects, using the original padding numbers? http://reviews.llvm.org/D15539 ___ cfe-commits mailing list cfe-commits@lists.l

Re: [PATCH] D15539: [libcxxabi] Reducing stack usage of test

2015-12-16 Thread Ben Craig via cfe-commits
bcraig updated this revision to Diff 43041. bcraig added a comment. Starting primes at 13, and skipping the larger twin in twin prime pairs. Using long double instead of char for padding to help alleviate fears of multiple structs having the same actual size. http://reviews.llvm.org/D15539 F

Re: [PATCH] D15539: [libcxxabi] Reducing stack usage of test

2015-12-16 Thread Ben Craig via cfe-commits
bcraig added a comment. In http://reviews.llvm.org/D15539#312319, @jroelofs wrote: > What does having them be `long double`s give over just multiplying the counts > by 16 (or however big it is on your platform)? Alignment? > > Seems like it'd be better to start with a prime that's ~16x larger, s

Re: [PATCH] D15539: [libcxxabi] Reducing stack usage of test

2015-12-16 Thread Ben Craig via cfe-commits
bcraig added a comment. In http://reviews.llvm.org/D15539#312336, @jroelofs wrote: > In http://reviews.llvm.org/D15539#312332, @bcraig wrote: > > > In http://reviews.llvm.org/D15539#312319, @jroelofs wrote: > > > > > What does having them be `long double`s give over just multiplying the > > > co

<    1   2   3