r278238 - [analyzer] Fix a crash in CloneDetector when calling functions by pointers.

2016-08-10 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Aug 10 11:25:16 2016 New Revision: 278238 URL: http://llvm.org/viewvc/llvm-project?rev=278238=rev Log: [analyzer] Fix a crash in CloneDetector when calling functions by pointers. CallExpr may have a null direct callee when the callee function is not known in

RE: r278234 - [OpenCL] Change block descriptor address space to constant.

2016-08-10 Thread Anastasia Stulova via cfe-commits
Hi Hans, Is it still possible to merge this change in release 3.9 branch. This is just a minor bug fix we have found with Clang Blocks and only affects OpenCL. PS, it goes together with a typo fix in the next commit r278235. Thanks in advance, Anastasia -Original Message- From:

r278235 - [OpenCL] Fix typo in test that I accidentally introduced in my previous commit.

2016-08-10 Thread Joey Gouly via cfe-commits
Author: joey Date: Wed Aug 10 11:04:14 2016 New Revision: 278235 URL: http://llvm.org/viewvc/llvm-project?rev=278235=rev Log: [OpenCL] Fix typo in test that I accidentally introduced in my previous commit. Modified: cfe/trunk/test/CodeGenOpenCL/cl20-device-side-enqueue.cl Modified:

Re: [PATCH] D23320: [analyzer] Fixed crash in CloneDetector in function calls.

2016-08-10 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL278238: [analyzer] Fix a crash in CloneDetector when calling functions by pointers. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D23320?vs=67345=67537#toc Repository:

Re: r278139 - [clang-cl] Make -gline-tables-only imply -gcodeview

2016-08-10 Thread Hans Wennborg via cfe-commits
Sure, r278240. On Wed, Aug 10, 2016 at 3:55 AM, Nico Weber wrote: > Since this flag is new in 3.9, should we merge this there? > > On Tue, Aug 9, 2016 at 1:23 PM, Reid Kleckner via cfe-commits > wrote: >> >> Author: rnk >> Date: Tue Aug 9

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-10 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: test/clang-tidy/modernize-make-shared.cpp:109 @@ +108,3 @@ + void create() { +auto ptr = std::shared_ptr(new Private(42)); + } aaron.ballman wrote: > Add comments explaining why make_shared is not correct. Also,

r278234 - [OpenCL] Change block descriptor address space to constant.

2016-08-10 Thread Joey Gouly via cfe-commits
Author: joey Date: Wed Aug 10 10:57:02 2016 New Revision: 278234 URL: http://llvm.org/viewvc/llvm-project?rev=278234=rev Log: [OpenCL] Change block descriptor address space to constant. The block descriptor is a GlobalVariable in the LLVM IR, so it shouldn't be in the private address space.

Re: r278234 - [OpenCL] Change block descriptor address space to constant.

2016-08-10 Thread Hans Wennborg via cfe-commits
Merged together with r278235 in r278248. Thanks, Hans On Wed, Aug 10, 2016 at 10:25 AM, Anastasia Stulova via cfe-commits wrote: > Hi Hans, > > Is it still possible to merge this change in release 3.9 branch. This is just > a minor bug fix we have found with Clang

Re: [PATCH] D17990: [clang-tidy] minor improvements in modernise-deprecated-headers check

2016-08-10 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/DeprecatedHeadersCheck.cpp:83 @@ +82,3 @@ + for (const auto : DeleteHeaders) { +DeleteHeadersSet.insert(Key); + } No danger of dangling references here, since `StringMap` copies keys. See

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

2016-08-10 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: alexfh. mboehme added a subscriber: cfe-commits. The check warns if an object is used after it has been moved, without an intervening reinitialization. See user-facing documentation for details. https://reviews.llvm.org/D23353 Files:

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

2016-08-10 Thread Martin Böhme via cfe-commits
mboehme added a comment. Apologies for the size of this patch. alexfh@ said he was willing to review it as-is -- however, I'm happy to resubmit in smaller pieces if necessary. https://reviews.llvm.org/D23353 ___ cfe-commits mailing list

Re: Modify MallocChecker.cpp to recognize kfree( )

2016-08-10 Thread Artem Dergachev via cfe-commits
Hey, that's a useful patch, i'd like it to be included! There is odd indentation in some places, but in general it looks correct. The usual thing to do nowadays is to put patches on review on Phabricator, would you like to do that? (http://llvm.org/docs/Phabricator.html,

Re: [PATCH] D13126: New static analyzer checker for loss of sign/precision

2016-08-10 Thread Artem Dergachev via cfe-commits
NoQ added a comment. Wow, i've completely forgot about this one. Sorry about that... I think this checker is good to have in the current shape, and probably incrementally developed. It'd probably move out of alpha whenever it's tweaked to somehow make sure it finds enough real bugs among

Re: [PATCH] D23265: [clang-tidy] enhance readability-else-after-return

2016-08-10 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D23265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2016-08-10 Thread Piotr Padlewski via cfe-commits
Prazek added a subscriber: Prazek. Prazek added a reviewer: Prazek. Prazek added a comment. I will review it later, but my first thoughts: 1. I think we should make some other group, because misc seems to be overloaded. I discussed it with Alex months ago - something like bugprone would be

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

2016-08-10 Thread Matt Kulukundis via cfe-commits
fowles added a subscriber: fowles. Comment at: test/clang-tidy/misc-use-after-move.cpp:158 @@ +157,3 @@ +std::move(ptr); +ptr.get(); + } would this warn on: std::unique_ptr ptr; std::move(ptr); ptr->Foo(); I would like it to since that is a likely

Re: [PATCH] D23265: [clang-tidy] enhance readability-else-after-return

2016-08-10 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! https://reviews.llvm.org/D23265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [clang-tools-extra] r278221 - [clang-rename] merge tests when possible

2016-08-10 Thread Aaron Ballman via cfe-commits
On Wed, Aug 10, 2016 at 9:28 AM, Kirill Bobyrev via cfe-commits wrote: > Author: omtcyfz > Date: Wed Aug 10 08:28:30 2016 > New Revision: 278221 > > URL: http://llvm.org/viewvc/llvm-project?rev=278221=rev > Log: > [clang-rename] merge tests when possible > > The only

Re: [PATCH] D23204: Visit lambda capture inits from RecursiveASTVisitor::TraverseLambdaCapture().

2016-08-10 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: include/clang/AST/RecursiveASTVisitor.h:892 @@ -891,1 +891,3 @@ + else +TRY_TO(TraverseStmt(LE->capture_init_begin()[C - LE->capture_begin()])); return true; I'd rather pass in the offset than doing math with

Re: [PATCH] D23158: [clang-rename] merge tests when possible

2016-08-10 Thread Kirill Bobyrev via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL278221: [clang-rename] merge tests when possible (authored by omtcyfz). Changed prior to commit: https://reviews.llvm.org/D23158?vs=67516=67517#toc Repository: rL LLVM

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

2016-08-10 Thread Kirill Bobyrev via cfe-commits
omtcyfz added a comment. In https://reviews.llvm.org/D23279#510234, @alexshap wrote: > > I do think that an automated tool will do a better job of changing field > > orderings in a non-breaking way than most people would, mostly due to > > initializer lists. > > > yeah, that was the original

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:64 @@ +63,3 @@ +void MoveForwardingReferenceCheck::registerMatchers(MatchFinder *Finder) { + if (!getLangOpts().CPlusPlus11) +return; sbenza wrote: > I'm

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

2016-08-10 Thread Marshall Clow via cfe-commits
mclow.lists added a comment. This looks good to me. However, we don't //usually// change libc++ for issue resolutions that have not yet adopted. We wait until they've "official". https://reviews.llvm.org/D23331 ___ cfe-commits mailing list

Re: [PATCH] D23265: [clang-tidy] enhance readability-else-after-return

2016-08-10 Thread Kirill Bobyrev via cfe-commits
omtcyfz updated this revision to Diff 67513. omtcyfz added a comment. Remove braces around single statement in `for` and `if` as Alex proposed. https://reviews.llvm.org/D23265 Files: clang-tidy/readability/ElseAfterReturnCheck.cpp docs/clang-tidy/checks/readability-else-after-return.rst

[clang-tools-extra] r278225 - [clang-rename] fix test introduced in r278221

2016-08-10 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Wed Aug 10 08:46:36 2016 New Revision: 278225 URL: http://llvm.org/viewvc/llvm-project?rev=278225=rev Log: [clang-rename] fix test introduced in r278221 Modified: clang-tools-extra/trunk/test/clang-rename/ComplicatedClassType.cpp Modified:

Re: [PATCH] D17990: [clang-tidy] minor improvements in modernise-deprecated-headers check

2016-08-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/DeprecatedHeadersCheck.cpp:79 @@ -69,3 +78,3 @@ for (const auto : std::vector>( {{"fenv.h", "cfenv"}, omtcyfz wrote: >

Re: [PATCH] D23158: [clang-rename] merge tests when possible

2016-08-10 Thread Kirill Bobyrev via cfe-commits
omtcyfz updated this revision to Diff 67516. omtcyfz added a comment. Delete two more files. https://reviews.llvm.org/D23158 Files: test/clang-rename/ClassAsTemplateArgument.cpp test/clang-rename/ClassAsTemplateArgumentFindByClass.cpp

[clang-tools-extra] r278223 - [clang-rename] remove bunch of deprecated tests

2016-08-10 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Wed Aug 10 08:32:37 2016 New Revision: 278223 URL: http://llvm.org/viewvc/llvm-project?rev=278223=rev Log: [clang-rename] remove bunch of deprecated tests Removed: clang-tools-extra/trunk/test/clang-rename/ClassAsTemplateArgumentFindByClass.cpp

Re: [clang-tools-extra] r278221 - [clang-rename] merge tests when possible

2016-08-10 Thread Aaron Ballman via cfe-commits
On Wed, Aug 10, 2016 at 9:54 AM, Aaron Ballman wrote: > On Wed, Aug 10, 2016 at 9:28 AM, Kirill Bobyrev via cfe-commits > wrote: >> Author: omtcyfz >> Date: Wed Aug 10 08:28:30 2016 >> New Revision: 278221 >> >> URL:

Re: [PATCH] D17990: [clang-tidy] minor improvements in modernise-deprecated-headers check

2016-08-10 Thread Kirill Bobyrev via cfe-commits
omtcyf0 marked an inline comment as done. omtcyf0 added a comment. https://reviews.llvm.org/D17990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23158: [clang-rename] merge tests when possible

2016-08-10 Thread Kirill Bobyrev via cfe-commits
omtcyfz updated this revision to Diff 67515. omtcyfz added a comment. Update files not previouysly added with `git add`. https://reviews.llvm.org/D23158 Files: test/clang-rename/ClassAsTemplateArgument.cpp test/clang-rename/ClassAsTemplateArgumentFindByClass.cpp

[clang-tools-extra] r278221 - [clang-rename] merge tests when possible

2016-08-10 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Wed Aug 10 08:28:30 2016 New Revision: 278221 URL: http://llvm.org/viewvc/llvm-project?rev=278221=rev Log: [clang-rename] merge tests when possible The only difference between some tests is -offset passed to clang-rename. It makes sense to merge them into a single file and

Re: [PATCH] D17990: [clang-tidy] minor improvements in modernise-deprecated-headers check

2016-08-10 Thread Kirill Bobyrev via cfe-commits
omtcyf0 updated this revision to Diff 67519. omtcyf0 added a comment. Address comments. https://reviews.llvm.org/D17990 Files: clang-tidy/modernize/DeprecatedHeadersCheck.cpp docs/clang-tidy/checks/modernize-deprecated-headers.rst test/clang-tidy/modernize-deprecated-headers-cxx03.cpp

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-10 Thread Samuel Benzaquen via cfe-commits
sbenza added inline comments. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:64 @@ +63,3 @@ +void MoveForwardingReferenceCheck::registerMatchers(MatchFinder *Finder) { + if (!getLangOpts().CPlusPlus11) +return; I'm guessing this is checking

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-10 Thread Martin Böhme via cfe-commits
mboehme added a comment. Now that https://reviews.llvm.org/D23004 is submitted, can you take another look? https://reviews.llvm.org/D0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D17990: [clang-tidy] minor improvements in modernise-deprecated-headers check

2016-08-10 Thread Kirill Bobyrev via cfe-commits
omtcyfz added a subscriber: omtcyfz. Comment at: clang-tidy/modernize/DeprecatedHeadersCheck.cpp:79 @@ -69,3 +78,3 @@ for (const auto : std::vector>( {{"fenv.h", "cfenv"}, aaron.ballman wrote:

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

2016-08-10 Thread Ben Craig via cfe-commits
bcraig added a comment. In https://reviews.llvm.org/D23279#511187, @omtcyfz wrote: > In https://reviews.llvm.org/D23279#510234, @alexshap wrote: > > > > I do think that an automated tool will do a better job of changing field > > > orderings in a non-breaking way than most people would, mostly

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

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

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

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=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). This

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

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 = +

Re: [PATCH] D17990: [clang-tidy] minor improvements in modernise-deprecated-headers check

2016-08-10 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D17990#511424, @omtcyf0 wrote: > Revert changes. Thanks! If Aaron has no objections, good to go. https://reviews.llvm.org/D17990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] trivial documentation fix regarding Obj-C ARC objc_arc_weak_reference_unavailable

2016-08-10 Thread Sean McBride via cfe-commits
Fixed incorrect docs that referred to: objc_arc_weak_unavailable when it should be: objc_arc_weak_reference_unavailable Cheers, Sean objc_arc_weak_unavailable-typo.patch Description: Binary data ___ cfe-commits mailing list

Re: [PATCH] D17990: [clang-tidy] minor improvements in modernise-deprecated-headers check

2016-08-10 Thread Kirill Bobyrev via cfe-commits
omtcyf0 added a comment. In https://reviews.llvm.org/D17990#511429, @alexfh wrote: > In https://reviews.llvm.org/D17990#511424, @omtcyf0 wrote: > > > Revert changes. > > > Thanks! If Aaron has no objections, good to go. Great! Thank you! https://reviews.llvm.org/D17990

[clang-tools-extra] r278255 - [Documentation] Fix grammar mistakes in docs/clang-tidy/index.rst spotted by Alexander Kornienko.

2016-08-10 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed Aug 10 13:02:15 2016 New Revision: 278255 URL: http://llvm.org/viewvc/llvm-project?rev=278255=rev Log: [Documentation] Fix grammar mistakes in docs/clang-tidy/index.rst spotted by Alexander Kornienko. Modified:

Re: [PATCH] D17990: [clang-tidy] minor improvements in modernise-deprecated-headers check

2016-08-10 Thread Kirill Bobyrev via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL278254: [clang-tidy] minor improvements in modernise-deprecated-headers check (authored by omtcyfz). Changed prior to commit: https://reviews.llvm.org/D17990?vs=67551=67560#toc Repository: rL LLVM

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

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

2016-08-10 Thread Kirill Bobyrev via cfe-commits
omtcyf0 added a subscriber: omtcyf0. omtcyf0 added a comment. In https://reviews.llvm.org/D23279#511439, @bcraig wrote: > I will agree that compilation databases are a (mostly) necessary, but not > sufficient part of the solution. The refactoring tool will need to be > careful about changing

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

2016-08-10 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Wed Aug 10 13:05:47 2016 New Revision: 278257 URL: http://llvm.org/viewvc/llvm-project?rev=278257=rev Log: [clang-tidy] enhance readability-else-after-return `readability-else-after-return` only warns about `return` calls, but LLVM Coding Standars stat that `throw`,

Re: [PATCH] D23265: [clang-tidy] enhance readability-else-after-return

2016-08-10 Thread Kirill Bobyrev via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL278257: [clang-tidy] enhance readability-else-after-return (authored by omtcyfz). Changed prior to commit: https://reviews.llvm.org/D23265?vs=67513=67561#toc Repository: rL LLVM

[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=rev Log: [Documentation] Highlighting consistency and spelling mistake fix in Clang-tidy readability-else-after-return description. Modified:

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

Re: [PATCH] D17990: [clang-tidy] minor improvements in modernise-deprecated-headers check

2016-08-10 Thread Kirill Bobyrev via cfe-commits
omtcyf0 updated this revision to Diff 67551. omtcyf0 marked an inline comment as not done. omtcyf0 added a comment. Revert changes. https://reviews.llvm.org/D17990 Files: clang-tidy/modernize/DeprecatedHeadersCheck.cpp docs/clang-tidy/checks/modernize-deprecated-headers.rst

[clang-tools-extra] r278254 - [clang-tidy] minor improvements in modernise-deprecated-headers check

2016-08-10 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Wed Aug 10 13:01:45 2016 New Revision: 278254 URL: http://llvm.org/viewvc/llvm-project?rev=278254=rev Log: [clang-tidy] minor improvements in modernise-deprecated-headers check This patch introduces a minor list of changes as proposed by Richard Smith in the mailing list.

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. In https://reviews.llvm.org/D23125#510632, @rsmith wrote: > This doesn't seem like quite the right user interface for this feature. The > module cache is volatile, and it's not really reasonable for people to assume > they know what is and isn't within it. Instead,

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=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 stat

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-10 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Comment at: docs/ReleaseNotes.rst:78 @@ -77,1 +77,3 @@ +- Bugfix for `modernize-make-unique + `_ I think will be better to have //Fixed

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/modernize-make-shared.cpp:109 @@ +108,3 @@ + void create() { +auto ptr = std::shared_ptr(new Private(42)); + } Prazek wrote: > aaron.ballman wrote: > > Add comments explaining why make_shared

[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=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:

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

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

[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=rev Log: [Documentation] Fix style and grammar mistake in Clang-tidy readability-else-after-return description spotted by Alexander Kornienko. Modified:

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=rev > Log: > Reapply [Sema] Add sizeof diagnostics for bzero Given that bzero is

Re: [clang-tools-extra] r278198 - [Documentation] Fix spelling mistakes in docs/clang-tidy/index.rst.

2016-08-10 Thread Alexander Kornienko via cfe-commits
Thanks! Could you fix one more nit below? On Aug 10, 2016 04:03, "Eugene Zelenko via cfe-commits" < cfe-commits@lists.llvm.org> wrote: Author: eugenezelenko Date: Tue Aug 9 20:55:51 2016 New Revision: 278198 URL: http://llvm.org/viewvc/llvm-project?rev=278198=rev Log: [Documentation] Fix

Re: [PATCH] D13126: New static analyzer checker for loss of sign/precision

2016-08-10 Thread Daniel Marjamäki via cfe-commits
danielmarjamaki updated this revision to Diff 67470. danielmarjamaki added a comment. Make sure patch can be applied in latest trunk. Ping. https://reviews.llvm.org/D13126 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt

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

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

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

[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=rev Log: [Documentation] Improve consistency. Mention Clang-rename Emacs integration in release notes. Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst

[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

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:

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

2016-08-10 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Comment at: docs/ReleaseNotes.rst:75 @@ +74,3 @@ + + This check warns if an object is used after it has been moved, without an + intervening reinitialization. Please remove //This check// and capitalize

[clang-tools-extra] r278262 - [Release Notes] Consistency in Clang-tidy entries' style.

2016-08-10 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed Aug 10 13:15:51 2016 New Revision: 278262 URL: http://llvm.org/viewvc/llvm-project?rev=278262=rev Log: [Release Notes] Consistency in Clang-tidy entries' style. Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst Modified:

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: [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 > >

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:

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=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 with

Re: [PATCH] D23198: clang-rename rename-all: support reading old/newname pairs from a YAML file

2016-08-10 Thread Miklos Vajna via cfe-commits
vmiklos added a comment. In https://reviews.llvm.org/D23198#510269, @alexfh wrote: > A few late comments. I've addressed these in r278201. Repository: rL LLVM https://reviews.llvm.org/D23198 ___ cfe-commits mailing list

r278202 - [x86] Fix a really nasty bug introduced in r276417 where alignment

2016-08-10 Thread Chandler Carruth via cfe-commits
Author: chandlerc Date: Wed Aug 10 02:32:47 2016 New Revision: 278202 URL: http://llvm.org/viewvc/llvm-project?rev=278202=rev Log: [x86] Fix a really nasty bug introduced in r276417 where alignment constraints were added to _mm256_broadcast_{pd,ps} intel intrinsics. The spec for these intrinics

Re: r276417 - [X86][AVX] Added support for lowering to VBROADCASTF128/VBROADCASTI128 with generic IR

2016-08-10 Thread Chandler Carruth via cfe-commits
On Fri, Jul 22, 2016 at 7:06 AM Simon Pilgrim via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rksimon > Date: Fri Jul 22 08:58:56 2016 > New Revision: 276417 > > URL: http://llvm.org/viewvc/llvm-project?rev=276417=rev > Log: > [X86][AVX] Added support for lowering to

Re: [PATCH] D23274: Add an option to clang-format to remove duplicate headers.

2016-08-10 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/Format.cpp:1242 @@ -1240,1 +1241,3 @@ }); + // The index of the include on which the cursor is currently put. + unsigned CurrentCursorIndex = UINT_MAX; This needs a comment on what it is actually

Re: [PATCH] D23274: Add an style option "DeduplicateIncludes" to clang-format to remove duplicate headers when sorting #includes.

2016-08-10 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 67483. ioeric marked an inline comment as done. ioeric added a comment. - Addressed review comments. https://reviews.llvm.org/D23274 Files: include/clang/Format/Format.h lib/Format/Format.cpp test/Format/remove-duplicate-includes.cpp

[clang-tools-extra] r278201 - clang-rename YAML reader: address post-commit comments

2016-08-10 Thread Miklos Vajna via cfe-commits
Author: vmiklos Date: Wed Aug 10 02:13:29 2016 New Revision: 278201 URL: http://llvm.org/viewvc/llvm-project?rev=278201=rev Log: clang-rename YAML reader: address post-commit comments Modified: clang-tools-extra/trunk/clang-rename/tool/ClangRename.cpp

Re: [PATCH] D23265: [clang-tidy] enhance readability-else-after-return

2016-08-10 Thread Kirill Bobyrev via cfe-commits
omtcyfz updated this revision to Diff 67475. omtcyfz marked 7 inline comments as done. omtcyfz added a comment. Address comments. https://reviews.llvm.org/D23265 Files: clang-tidy/readability/ElseAfterReturnCheck.cpp docs/clang-tidy/checks/readability-else-after-return.rst

Re: [PATCH] D22729: MPIBufferDerefCheck for Clang-Tidy

2016-08-10 Thread Alexander Droste via cfe-commits
Alexander_Droste added a comment. No but I guess it would be a good idea to ask for commit access. I'll proceed like suggested here: http://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access. https://reviews.llvm.org/D22729 ___ cfe-commits

Re: [PATCH] D23265: [clang-tidy] enhance readability-else-after-return

2016-08-10 Thread Kirill Bobyrev via cfe-commits
omtcyfz updated this revision to Diff 67476. omtcyfz added a comment. Make helper matcher `const`. https://reviews.llvm.org/D23265 Files: clang-tidy/readability/ElseAfterReturnCheck.cpp docs/clang-tidy/checks/readability-else-after-return.rst

Re: [PATCH] D23274: Add an style option "DeduplicateIncludes" to clang-format to remove duplicate headers when sorting #includes.

2016-08-10 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: include/clang/Format/Format.h:551 @@ +550,3 @@ + /// sorting ``#includes``. + bool DeduplicateIncludes; + Actually, how about we just do this unconditionally? I think people will always want it.

Re: [PATCH] D23274: Add an style option "DeduplicateIncludes" to clang-format to remove duplicate headers when sorting #includes.

2016-08-10 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include/clang/Format/Format.h:551 @@ +550,3 @@ + /// sorting ``#includes``. + bool DeduplicateIncludes; + Sounds good to me. I'll get rid of the option then. https://reviews.llvm.org/D23274

[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] D23158: [clang-rename] merge tests when possible

2016-08-10 Thread Kirill Bobyrev via cfe-commits
omtcyfz updated this revision to Diff 67501. omtcyfz added a comment. Address comments. https://reviews.llvm.org/D23158 Files: test/clang-rename/ClassAsTemplateArgument.cpp test/clang-rename/ClassFindByName.cpp test/clang-rename/ClassSimpleRenaming.cpp

Re: r278139 - [clang-cl] Make -gline-tables-only imply -gcodeview

2016-08-10 Thread Nico Weber via cfe-commits
Since this flag is new in 3.9, should we merge this there? On Tue, Aug 9, 2016 at 1:23 PM, Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rnk > Date: Tue Aug 9 12:23:56 2016 > New Revision: 278139 > > URL: http://llvm.org/viewvc/llvm-project?rev=278139=rev > Log: >

Re: [PATCH] D22729: MPIBufferDerefCheck for Clang-Tidy

2016-08-10 Thread Haojian Wu via cfe-commits
hokein added a comment. Do you have commit access now? https://reviews.llvm.org/D22729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23274: Add an style option "DeduplicateIncludes" to clang-format to remove duplicate headers when sorting #includes.

2016-08-10 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 67484. ioeric added a comment. - Always deduplicate when sorting includes. Get rid of the option. https://reviews.llvm.org/D23274 Files: lib/Format/Format.cpp test/Format/remove-duplicate-includes.cpp tools/clang-format/ClangFormat.cpp

Re: [PATCH] D23274: Make clang-format remove duplicate headers when sorting #includes.

2016-08-10 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/Format.cpp:1224 @@ -1222,1 +1223,3 @@ +// Finds the index of the #include on which the cursor will be put after +// sorting/deduplicating. First off, make this return a pair with the two

Re: [PATCH] D17990: [clang-tidy] minor improvements in modernise-deprecated-headers check

2016-08-10 Thread Kirill Bobyrev via cfe-commits
omtcyf0 updated this revision to Diff 67488. omtcyf0 marked 2 inline comments as done. omtcyf0 added a comment. Address comments. https://reviews.llvm.org/D17990 Files: clang-tidy/modernize/DeprecatedHeadersCheck.cpp docs/clang-tidy/checks/modernize-deprecated-headers.rst

  1   2   >