Re: [PATCH] D23279: clang-reorder-fields

2016-08-10 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. 0. the tool relies on the compilation database from day one (like the other clang tools using tooling::RefactoringTool) 1. regarding TUs:. A. just in case how it works: it uses the full name of record to find the definition, then it changes the definition, then it fin

[clang-tools-extra] r278263 - [Documentation] Highlighting consistency and spelling mistake fix in Clang-tidy readability-else-after-return description.

2016-08-10 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed Aug 10 13:30:14 2016 New Revision: 278263 URL: http://llvm.org/viewvc/llvm-project?rev=278263&view=rev Log: [Documentation] Highlighting consistency and spelling mistake fix in Clang-tidy readability-else-after-return description. Modified: clang-tools-extra/

r278264 - Reapply [Sema] Add sizeof diagnostics for bzero

2016-08-10 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Wed Aug 10 13:34:47 2016 New Revision: 278264 URL: http://llvm.org/viewvc/llvm-project?rev=278264&view=rev Log: Reapply [Sema] Add sizeof diagnostics for bzero Reapply r277787. For memset (and others) we can get diagnostics like: struct stat { int x; }; void foo(struct st

Re: r277787 - [Sema] Add sizeof diagnostics for bzero

2016-08-10 Thread Bruno Cardoso Lopes via cfe-commits
This typo was exactly the reason why, r278264. Thanks On Fri, Aug 5, 2016 at 10:09 AM, David Majnemer wrote: > > > On Thu, Aug 4, 2016 at 4:55 PM, Bruno Cardoso Lopes via cfe-commits > wrote: >> >> Author: bruno >> Date: Thu Aug 4 18:55:22 2016 >> New Revision: 277787 >> >> URL: http://llvm.org

Re: [PATCH] D23279: clang-reorder-fields

2016-08-10 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. > Well, multi-TU support is needed for many tools and it is far beyond one tool > implementation details if we want it to be nice. I want to >have multi-TU > support in the clang-refactor, but it is still in designing stage at the > moment. At first, one translation un

[clang-tools-extra] r278279 - [Documentation] Fix style and grammar mistake in Clang-tidy readability-else-after-return description spotted by Alexander Kornienko.

2016-08-10 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed Aug 10 14:49:38 2016 New Revision: 278279 URL: http://llvm.org/viewvc/llvm-project?rev=278279&view=rev Log: [Documentation] Fix style and grammar mistake in Clang-tidy readability-else-after-return description spotted by Alexander Kornienko. Modified: clang-t

Re: r278264 - Reapply [Sema] Add sizeof diagnostics for bzero

2016-08-10 Thread Joerg Sonnenberger via cfe-commits
On Wed, Aug 10, 2016 at 06:34:47PM -, Bruno Cardoso Lopes via cfe-commits wrote: > Author: bruno > Date: Wed Aug 10 13:34:47 2016 > New Revision: 278264 > > URL: http://llvm.org/viewvc/llvm-project?rev=278264&view=rev > Log: > Reapply [Sema] Add sizeof diagnostics for bzero Given that bzero

[libcxx] r278282 - std:: quailfy the calls for cend/crend/cbegin/cend. Fixes bug 28927.

2016-08-10 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Aug 10 15:04:46 2016 New Revision: 278282 URL: http://llvm.org/viewvc/llvm-project?rev=278282&view=rev Log: std:: quailfy the calls for cend/crend/cbegin/cend. Fixes bug 28927. Added: libcxx/trunk/test/std/iterators/iterator.range/begin-end.fail.cpp Modified: li

Re: [PATCH] D23003: [ObjC Availability] Warn upon unguarded use of partially available declaration

2016-08-10 Thread Erik Pilkington via cfe-commits
erik.pilkington updated this revision to Diff 67582. erik.pilkington added a comment. This new patch rebases on top of r277887, and addresses Manman's comments. After looking through the AST nodes, I realized I neglected to emit a diagnostic for member expressions. I also noticed that function p

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-10 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:512 @@ +511,3 @@ +} +void UseAfterMoveFinder::getReinits( +const CFGBlock *Block, const ValueDecl *MovedVariable, Please insert empty line before. Repository: rL LLVM

Re: [PATCH] D22782: Added 'inline' attribute to __init to inline the basic_string's constructor

2016-08-10 Thread Laxman Sole via cfe-commits
laxmansole updated this revision to Diff 67597. laxmansole added a comment. Added inline attribute to the forward/input iterator __init's. Thanks @EricWF for suggestion. https://reviews.llvm.org/D22782 Files: libcxx/include/string Index: libcxx/include/string ===

Re: [PATCH] D22910: Add support for CXXOperatorCallExpr in Expr::HasSideEffects

2016-08-10 Thread Richard Smith via cfe-commits
rsmith added a comment. If `IncludePossibleEffects` is false, the goal of `HasSideEffect` is to determine whether we think the user intended for the expression to have a side-effect. It seems reasonable to assume that any use of an assignment operator had that intent, so (since it seems like th

Re: [libcxx] r278282 - std:: quailfy the calls for cend/crend/cbegin/cend. Fixes bug 28927.

2016-08-10 Thread Hans Wennborg via cfe-commits
Should we merge this to 3.9? Looks like a straight-forward fix for something that was hit by real code. Thanks, Hans On Wed, Aug 10, 2016 at 1:04 PM, Marshall Clow via cfe-commits wrote: > Author: marshall > Date: Wed Aug 10 15:04:46 2016 > New Revision: 278282 > > URL: http://llvm.org/viewvc/ll

Re: [PATCH] D23361: [OpenCL] AMDGCN: Fix size_t type

2016-08-10 Thread Matt Arsenault via cfe-commits
arsenm added a subscriber: arsenm. Comment at: lib/Basic/Targets.cpp:2008-2010 @@ +2007,5 @@ + uint64_t getOpenCLMaxPointerWidth() const override { +if (GPU <= GK_CAYMAN) + return 32; +return 64; + } Should use ternary operator and check the triple

[PATCH] D23375: Add kfree( ) to MallocChecker.cpp

2016-08-10 Thread Andrew Wells via cfe-commits
andrewmw94 created this revision. andrewmw94 added reviewers: zaks.anna, dcoughlin, dergachev.a. andrewmw94 added a subscriber: cfe-commits. andrewmw94 set the repository for this revision to rL LLVM. andrewmw94 added a project: clang-c. Adds the kfree( ) function to MallocChecker.cpp Repository:

Re: [PATCH] D23375: Add kfree( ) to MallocChecker.cpp

2016-08-10 Thread Andrew Wells via cfe-commits
andrewmw94 updated this revision to Diff 67610. andrewmw94 added a comment. Change the test file kmalloc-linux.c to use kfree( ). Sorry if there was a way to put both patch files together; I wasn't able to find one. Repository: rL LLVM https://reviews.llvm.org/D23375 Files: kmalloc-linux

Re: r278264 - Reapply [Sema] Add sizeof diagnostics for bzero

2016-08-10 Thread Bruno Cardoso Lopes via cfe-commits
Hi Joerg, > Given that bzero is pretty much non-standard at this point, I strongly > dislike the approach of checking only the function name. Thanks for the feedback. bzero it's widely used though, I think it's a usability win to perform a diagnostic here, despite bzero being non-standard. Is th

[clang-tools-extra] r278295 - [Documentation] Improve consistency.

2016-08-10 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed Aug 10 17:00:49 2016 New Revision: 278295 URL: http://llvm.org/viewvc/llvm-project?rev=278295&view=rev Log: [Documentation] Improve consistency. Mention Clang-rename Emacs integration in release notes. Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-10 Thread Manman Ren via cfe-commits
manmanren updated this revision to Diff 67621. manmanren added a comment. Addressing Richard's comments. https://reviews.llvm.org/D23125 Files: docs/Modules.rst include/clang/Driver/Options.td include/clang/Lex/HeaderSearch.h include/clang/Lex/HeaderSearchOptions.h include/clang/Seria

[libcxx] r278300 - Implement LWG 2148: Make non-enum default hash specialization well-formed

2016-08-10 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Aug 10 17:45:26 2016 New Revision: 278300 URL: http://llvm.org/viewvc/llvm-project?rev=278300&view=rev Log: Implement LWG 2148: Make non-enum default hash specialization well-formed Summary: This patch removes the static_assert for non-enum types in the primary hash temp

RE: [clang-tools-extra] r278257 - [clang-tidy] enhance readability-else-after-return

2016-08-10 Thread Yung, Douglas via cfe-commits
Hi Kirill, I believe your change is causing the PS4 bots to be red. Specifically, the test you added makes use of "throw" which doesn't work on the PS4 target since exceptions are disabled by default on the PS4 target. I think explicitly enabling exceptions should fix the test and propose the f

Re: [PATCH] D23331: Implement LWG 2148: Make non-enum default hash specialization well-formed

2016-08-10 Thread Eric Fiselier via cfe-commits
EricWF accepted this revision. EricWF added a reviewer: EricWF. EricWF added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D23331#511204, @mclow.lists wrote: > This looks good to me. > However, we don't //usually// change libc++ for issue resolutions tha

Re: [PATCH] D23096: [Sema] Pass CombineWithOuterScope = true to constructor of LocalInstantiationScope

2016-08-10 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 67623. ahatanak added a comment. Handle the case in which the enum is declared inside a member function and add test cases. The variable template test case still crashes. It looks like it crashes whenever the lambda expression takes a default argument: te

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-10 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Lex/HeaderSearchOptions.h:96-97 @@ -95,1 +95,4 @@ + /// \brief The directory used to load prebuilt module files. + std::string PrebuiltModulePath; + It would seem preferable to allow multiple of these, to

[PATCH] D23385: Implement __has_constant_initializer(obj) expression traits.

2016-08-10 Thread Eric Fiselier via cfe-commits
EricWF created this revision. EricWF added reviewers: aaron.ballman, rsmith, majnemer. EricWF added a subscriber: cfe-commits. Safe static initialization is hard to do correctly in C++. The static initialization order fiasco often causes bugs when variables are dynamically initialized. However

Re: [PATCH] D23385: Implement __has_constant_initializer(obj) expression traits.

2016-08-10 Thread Eric Fiselier via cfe-commits
EricWF added a comment. Open questions: - What should __has_constant_initializer do for non-static inputs? Currently it returns false. - Do I need to do more to handle value dependent inputs? - Should expression traits SFINAE? https://reviews.llvm.org/D23385 __

Re: [PATCH] D23385: Implement __has_constant_initializer(obj) expression traits.

2016-08-10 Thread Eric Fiselier via cfe-commits
EricWF updated this revision to Diff 67635. EricWF added a comment. Check the initializers of TLS_Dynamic variables since they may actually be non-dynamic. https://reviews.llvm.org/D23385 Files: include/clang/AST/Expr.h include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/Expre

Re: [libcxx] r278282 - std:: quailfy the calls for cend/crend/cbegin/cend. Fixes bug 28927.

2016-08-10 Thread Eric Fiselier via cfe-commits
I would support merging this change. /Eric On Wed, Aug 10, 2016 at 3:20 PM, Hans Wennborg via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Should we merge this to 3.9? Looks like a straight-forward fix for > something that was hit by real code. > > Thanks, > Hans > > On Wed, Aug 10, 2016 a

Re: [PATCH] D23003: [ObjC Availability] Warn upon unguarded use of partially available declaration

2016-08-10 Thread Manman Ren via cfe-commits
manmanren added a comment. This looks pretty good. Can you add a few more testing cases for templates such as @available inside the template function, @available enclosing the template instantiation? Cheers, Manman Comment at: lib/Sema/SemaDeclAttr.cpp:6634 @@ +6633,3 @@ + /

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-10 Thread Manman Ren via cfe-commits
manmanren added a comment. Thanks, Manman Comment at: include/clang/Lex/HeaderSearchOptions.h:96-97 @@ -95,1 +95,4 @@ + /// \brief The directory used to load prebuilt module files. + std::string PrebuiltModulePath; + rsmith wrote: > It would seem preferable

Re: [PATCH] D22711: Diagnose invalid failure memory orderings.

2016-08-10 Thread Eric Fiselier via cfe-commits
EricWF added a comment. ping. Clang correctly lowers the invalid memory orders, so do we want these diagnostics? https://reviews.llvm.org/D22711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

r278306 - [Order Files] Don't use empty order files

2016-08-10 Thread Chris Bieneman via cfe-commits
Author: cbieneman Date: Wed Aug 10 19:19:51 2016 New Revision: 278306 URL: http://llvm.org/viewvc/llvm-project?rev=278306&view=rev Log: [Order Files] Don't use empty order files LD64 does optimization on symbol layouts that gets disabled whenever an order file is passed (even if it is empty). Th

Re: [PATCH] D22711: Diagnose invalid failure memory orderings.

2016-08-10 Thread JF Bastien via cfe-commits
jfb added a comment. Warnings look correct. Could they be made more useful by suggesting that `acq_rel` be `acquire` instead, and `release` be `relaxed` instead? https://reviews.llvm.org/D22711 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-10 Thread Bruno Cardoso Lopes via cfe-commits
bruno added inline comments. Comment at: lib/Frontend/CompilerInstance.cpp:1438-1450 @@ -1437,3 +1437,15 @@ // Search for a module with the given name. Module = PP->getHeaderSearchInfo().lookupModule(ModuleName); -if (!Module) { +HeaderSearchOptions &HSOpts = +

Re: [PATCH] D22782: Added 'inline' attribute to __init to inline the basic_string's constructor

2016-08-10 Thread Eric Fiselier via cfe-commits
On Mon, Aug 8, 2016 at 9:32 AM, David Blaikie via cfe-commits < cfe-commits@lists.llvm.org> wrote: > I'm still (as per another similar thread) a bit concerned this is working > around a compiler optimizer bug - I'd love to see a standalone example of > this behavior (that adding the inline keyword

Re: [libcxx] r278191 - test/hard_link_count(): Fix test on darwin

2016-08-10 Thread Eric Fiselier via cfe-commits
Thanks Matthias. My apoligies, I lost track of this patch. On Tue, Aug 9, 2016 at 7:31 PM, Bruno Cardoso Lopes via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Thanks Matthias! > > On Tue, Aug 9, 2016 at 6:02 PM, Matthias Braun via cfe-commits > wrote: > > Author: matze > > Date: Tue Aug

[libcxx] r278311 - Add missing REQUIRES for C++14

2016-08-10 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Aug 10 22:33:41 2016 New Revision: 278311 URL: http://llvm.org/viewvc/llvm-project?rev=278311&view=rev Log: Add missing REQUIRES for C++14 Modified: libcxx/trunk/test/libcxx/utilities/any/size_and_alignment.pass.cpp libcxx/trunk/test/libcxx/utilities/any/small_typ

Re: [PATCH] D23284: Add -Rpass-with-hotness

2016-08-10 Thread Adam Nemet via cfe-commits
anemet updated this revision to Diff 67653. anemet added a comment. Since -Rpass-with-hotness is not part of R_group, we need to manually forward it to clang -cc1. I've also extended the test to cover this bug. https://reviews.llvm.org/D23284 Files: include/clang/Basic/DiagnosticDriverKinds.

r278315 - bindings: expose diagnostic formatting to Python

2016-08-10 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Thu Aug 11 00:31:07 2016 New Revision: 278315 URL: http://llvm.org/viewvc/llvm-project?rev=278315&view=rev Log: bindings: expose diagnostic formatting to Python This makes it easier for tools using the Python libclang bindings to display diagnostics in a manner consistent w

Re: [PATCH] D21279: Fix some issues in clang-format's AlignConsecutive modes

2016-08-10 Thread Ben Harper via cfe-commits
PING. Is there anything I can do to make reviewing easier? For example, I could run my code vs master on some large code bases (eg linux kernel, chromium), and verify that there are no crashes, and also manually spot check some results. Ben On Wed, 20 Jul 2016 at 21:43 Ben Harper wrote: > bmh

<    1   2