Re: [clang-tools-extra] r300588 - [clang-tidy] Address a few late comments.

2017-04-18 Thread Alexander Kornienko via cfe-commits
Thanks! One nit: StringRef doesn't need to be qualified. On Apr 18, 2017 11:00 PM, "Haojian Wu via cfe-commits" < cfe-commits@lists.llvm.org> wrote: Author: hokein Date: Tue Apr 18 15:47:34 2017 New Revision: 300588 URL: http://llvm.org/viewvc/llvm-project?rev=300588&view=rev Log: [clang-tidy] A

[libcxx] r300626 - Cleanup _LIBCPP_HAS_NO_ in the input.output library

2017-04-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Apr 18 18:38:41 2017 New Revision: 300626 URL: http://llvm.org/viewvc/llvm-project?rev=300626&view=rev Log: Cleanup _LIBCPP_HAS_NO_ in the input.output library Modified: libcxx/trunk/include/fstream libcxx/trunk/include/istream libcxx/trunk/include/ostream

[libcxx] r300627 - Cleanup _LIBCPP_HAS_NO_ macro usage in regex

2017-04-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Apr 18 18:42:15 2017 New Revision: 300627 URL: http://llvm.org/viewvc/llvm-project?rev=300627&view=rev Log: Cleanup _LIBCPP_HAS_NO_ macro usage in regex Modified: libcxx/trunk/include/regex libcxx/trunk/test/std/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp

r300628 - Use less temporary AttributeLists NFC

2017-04-18 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Apr 18 18:50:03 2017 New Revision: 300628 URL: http://llvm.org/viewvc/llvm-project?rev=300628&view=rev Log: Use less temporary AttributeLists NFC Modified: cfe/trunk/lib/CodeGen/CGCall.cpp cfe/trunk/lib/CodeGen/CGCall.h cfe/trunk/lib/CodeGen/CGVTables.cpp cfe

[libcxx] r300632 - Cleanup _LIBCPP_HAS_NO_ macros in the numeric tests and headers

2017-04-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Apr 18 19:23:45 2017 New Revision: 300632 URL: http://llvm.org/viewvc/llvm-project?rev=300632&view=rev Log: Cleanup _LIBCPP_HAS_NO_ macros in the numeric tests and headers Modified: libcxx/trunk/include/random libcxx/trunk/include/valarray libcxx/trunk/test/s

[libcxx] r300633 - Cleanup _LIBCPP_HAS_NO_ in the string library.

2017-04-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Apr 18 19:28:44 2017 New Revision: 300633 URL: http://llvm.org/viewvc/llvm-project?rev=300633&view=rev Log: Cleanup _LIBCPP_HAS_NO_ in the string library. Modified: libcxx/trunk/include/string libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_ins

[PATCH] D32207: Corrrect warn_unused_result attribute

2017-04-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. The original idea was that if the attribute on an operator, that the return-value unused-ness wouldn't matter. However, all of the operators except postfix inc/dec return references! References don't result in this warning anyway, so those are already exclude

[libcxx] r300635 - Cleanup _LIBCPP_HAS_NO_ in the utilities library

2017-04-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Apr 18 19:56:32 2017 New Revision: 300635 URL: http://llvm.org/viewvc/llvm-project?rev=300635&view=rev Log: Cleanup _LIBCPP_HAS_NO_ in the utilities library Modified: libcxx/trunk/test/std/utilities/meta/meta.help/integral_constant.pass.cpp libcxx/trunk/test/std/

[PATCH] D32187: [CodeGen][ObjC]

2017-04-18 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 95667. ahatanak added a comment. Unconditionally ban jumping into body of ObjC fast enumeration loop. https://reviews.llvm.org/D32187 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/JumpDiagnostics.cpp lib/Sema/SemaStmt.cpp test/SemaObjC

[libcxx] r300637 - Cleanup _LIBCPP_HAS_NO_ in support headers and final tests

2017-04-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Apr 18 20:02:49 2017 New Revision: 300637 URL: http://llvm.org/viewvc/llvm-project?rev=300637&view=rev Log: Cleanup _LIBCPP_HAS_NO_ in support headers and final tests Modified: libcxx/trunk/test/libcxx/containers/sequences/vector/asan_throw.pass.cpp libcxx/trunk/t

[libcxx] r300643 - Cleanup remaining _LIBCPP_HAS_NO_ usages in container headers

2017-04-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Apr 18 20:23:04 2017 New Revision: 300643 URL: http://llvm.org/viewvc/llvm-project?rev=300643&view=rev Log: Cleanup remaining _LIBCPP_HAS_NO_ usages in container headers Modified: libcxx/trunk/include/__hash_table libcxx/trunk/include/__split_buffer libcxx/tru

[libcxx] r300644 - Cleanup remaining usages of _LIBCPP_HAS_NO_ in tuple and utility

2017-04-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Apr 18 20:23:39 2017 New Revision: 300644 URL: http://llvm.org/viewvc/llvm-project?rev=300644&view=rev Log: Cleanup remaining usages of _LIBCPP_HAS_NO_ in tuple and utility Modified: libcxx/trunk/include/__tuple libcxx/trunk/include/tuple libcxx/trunk/include/

[libcxx] r300646 - Cleanup remaining usages of _LIBCPP_HAS_NO_ in the functional library

2017-04-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Apr 18 20:28:47 2017 New Revision: 300646 URL: http://llvm.org/viewvc/llvm-project?rev=300646&view=rev Log: Cleanup remaining usages of _LIBCPP_HAS_NO_ in the functional library Modified: libcxx/trunk/include/__functional_base libcxx/trunk/include/functional Mod

[libcxx] r300648 - Cleanup usages of _LIBCPP_HAS_NO_ in , , , and

2017-04-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Apr 18 20:34:08 2017 New Revision: 300648 URL: http://llvm.org/viewvc/llvm-project?rev=300648&view=rev Log: Cleanup usages of _LIBCPP_HAS_NO_ in , , , and Modified: libcxx/trunk/include/bitset libcxx/trunk/include/ios libcxx/trunk/include/iterator libcxx

[libcxx] r300649 - Cleanup usages of _LIBCPP_HAS_NO_ in

2017-04-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Apr 18 20:35:58 2017 New Revision: 300649 URL: http://llvm.org/viewvc/llvm-project?rev=300649&view=rev Log: Cleanup usages of _LIBCPP_HAS_NO_ in Modified: libcxx/trunk/include/exception Modified: libcxx/trunk/include/exception URL: http://llvm.org/viewvc/llvm-proje

r300650 - [modules] Properly look up the owning module for an instantiation of a merged template.

2017-04-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Apr 18 20:36:43 2017 New Revision: 300650 URL: http://llvm.org/viewvc/llvm-project?rev=300650&view=rev Log: [modules] Properly look up the owning module for an instantiation of a merged template. When looking for the template instantiation pattern of a templated entity,

[PATCH] D32210: [Sema][ObjC] Add support for attribute "noescape"

2017-04-18 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. This patch adds support for attribute "noescape", which is used to tell the compiler that a block passed to a function will not be called after the function returns. To ensure that the block does not escape, clang imposes the following restrictions on its usage:

[libcxx] r300652 - Fix tests for extended noexcept in the container adaptors tests

2017-04-18 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Apr 18 21:07:12 2017 New Revision: 300652 URL: http://llvm.org/viewvc/llvm-project?rev=300652&view=rev Log: Fix tests for extended noexcept in the container adaptors tests Modified: libcxx/trunk/test/std/containers/container.adaptors/priority.queue/priqueue.cons/defa

r300653 - Fix member function call with null 'this' pointer.

2017-04-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Apr 18 21:19:21 2017 New Revision: 300653 URL: http://llvm.org/viewvc/llvm-project?rev=300653&view=rev Log: Fix member function call with null 'this' pointer. Modified: cfe/trunk/lib/AST/Decl.cpp Modified: cfe/trunk/lib/AST/Decl.cpp URL: http://llvm.org/viewvc/llvm-

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-18 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. To be clear, I'm find with disabling union tbaa until we can fix things for real. I'm somewhat concerned that this patch is quadratic in the AST. FWIW, I tried just setting TBAAPath = true in EmitLValueForField and then returning nullptr from CodeGenTBAA::getTBAAStructT

Re: r300650 - [modules] Properly look up the owning module for an instantiation of a merged template.

2017-04-18 Thread Chandler Carruth via cfe-commits
This appears to break a pretty straightforward use of things like libstdc++'s __alloctr_rebind (undefined template with a default argument, specializations, etc): https://github.com/gcc-mirror/gcc/blob/gcc-4_9-branch/libstdc++-v3/include/bits/alloc_traits.h#L58-L73 At least, I'm getting errors fro

[PATCH] D32187: [CodeGen][ObjC]

2017-04-18 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks, this looks great. A few tweaks about the diagnostic and LGTM. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:4985 +def note_protected_by_objc_fast_enumer

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2017-04-18 Thread Erik Nyquist via Phabricator via cfe-commits
enyquist updated this revision to Diff 95680. enyquist added a comment. Rebased on latest Repository: rL LLVM https://reviews.llvm.org/D28462 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/WhitespaceManager.cpp lib/Format/Whit

Re: r300650 - [modules] Properly look up the owning module for an instantiation of a merged template.

2017-04-18 Thread Chandler Carruth via cfe-commits
Consider code like the following: ``` #include template class MyAllocator : public std::allocator { public: typedef std::allocator Alloc; typedef typename Alloc::pointer pointer; typedef typename Alloc::size_type size_type; MyAllocator() {} template MyAllocator(const MyAllocator

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks for CC'ing me. There are two problems here. The first is that vectors are aggregates which contain values of their element type. (And honestly, we may need to be more permissive than this because people are pretty lax about the element type in a vector until i

[PATCH] D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments

2017-04-18 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai updated this revision to Diff 95684. xiangzhai added a subscriber: cfe-commits. xiangzhai added a comment. Hi Artem, I updated my patch as you suggested: never using `Arg1Val` after `TotalSize` is computed, on all branches. please review it, thanks a lot! Regards, Leslie Zhai Reposi

r300658 - [CodeGen] Use APInt::lshrInPlace instead of APInt::lshr. NFC

2017-04-18 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Apr 19 00:17:33 2017 New Revision: 300658 URL: http://llvm.org/viewvc/llvm-project?rev=300658&view=rev Log: [CodeGen] Use APInt::lshrInPlace instead of APInt::lshr. NFC Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp Modified: cfe/trunk/lib/CodeGen/CGExprConstant

r300659 - Revert r300653 and r300650. The underlying commit fixes one issue with

2017-04-18 Thread Chandler Carruth via cfe-commits
Author: chandlerc Date: Wed Apr 19 00:25:13 2017 New Revision: 300659 URL: http://llvm.org/viewvc/llvm-project?rev=300659&view=rev Log: Revert r300653 and r300650. The underlying commit fixes one issue with modules but exposes much more widespread issues. Example and more information is on the rev

Re: r300650 - [modules] Properly look up the owning module for an instantiation of a merged template.

2017-04-18 Thread Chandler Carruth via cfe-commits
Reverted in r300658. On Tue, Apr 18, 2017 at 8:30 PM Chandler Carruth wrote: > Consider code like the following: > > ``` > #include > > template > class MyAllocator : public std::allocator { > public: > typedef std::allocator Alloc; > typedef typename Alloc::pointer pointer; > typedef t

Re: r300650 - [modules] Properly look up the owning module for an instantiation of a merged template.

2017-04-18 Thread Richard Smith via cfe-commits
Thanks for the revert, I'll investigate tomorrow. On 18 Apr 2017 10:41 pm, "Chandler Carruth" wrote: > Reverted in r300658. > > On Tue, Apr 18, 2017 at 8:30 PM Chandler Carruth > wrote: > >> Consider code like the following: >> >> ``` >> #include >> >> template >> class MyAllocator : public s

r300661 - clang-format: Properly match parens of macro parameter lists.

2017-04-18 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Apr 19 01:06:38 2017 New Revision: 300661 URL: http://llvm.org/viewvc/llvm-project?rev=300661&view=rev Log: clang-format: Properly match parens of macro parameter lists. No tests yet, but this will be tested by the upcoming: https://reviews.llvm.org/D28462 Modified:

[PATCH] D32213: [Sema] Use MSVC inner class behavior on Itanium

2017-04-18 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai created this revision. Windows Itanium aims to use MSVC export and import semantics. Inner class members shouldn't be exported on a dllexport explicit instantiation definition of the outer class, and they shouldn't be imported on a dllimport explicit instantiation declaration of the outer

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2017-04-18 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/WhitespaceManager.cpp:413 + + while (Param && !Param->is(tok::l_paren)) { +if (!Param->is(tok::identifier) && !Param->is(tok::comma)) enyquist wrote: > djasper wrote: > > enyquist wrote: > > > djasper wro

[PATCH] D31868: [analyzer] Check NULL pointer dereference issue for memset function

2017-04-18 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai updated this revision to Diff 95690. xiangzhai added a comment. Hi Artem, > so you're doing the binding thing now? No! it only works for `RetVal` for example `int *ret = memset(x, 0, sizeof(int));`, please see my testcase: void foo() { int *x = malloc(sizeof(int)); int *ret

[PATCH] D30087: [Driver] Unify linking of OpenMP runtime. NFCI.

2017-04-18 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. Ping https://reviews.llvm.org/D30087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32178: Delete unstable integration tests

2017-04-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks for working on this! We had some more discussion about these tests yesterday, and we would prefer to keep them actually. We might want to use something like `REQUIRES` instead, but right now we are still not sure what to check for. https://reviews.llvm.org/D32

<    1   2