Re: r321099 - [driver][darwin] Take the OS version specified in "-target" as the target

2017-12-21 Thread Martin Böhme via cfe-commits
Thanks for the quick response and your suggestions! I believe the workaround you suggest in 1) will work for us, so there's no need for an urgent change. Thanks again! On 21 December 2017 at 20:11, Alex L wrote: > Thanks for raising your concerns. > > We decided to avoid

Re: r321099 - [driver][darwin] Take the OS version specified in "-target" as the target

2017-12-21 Thread Martin Böhme via cfe-commits
This is causing problems in some internal builds that specify both -mios-simulator-version-min=9.0 and --target=x86_64-apple-ios My expectation would be for the code to take the minimum OS version number from the -mios-simulator-version-min flag. In fact, however, the code seems to be completely

[PATCH] D26041: [clang-tidy] Extend misc-use-after-move to support unique_ptr and shared_ptr.

2016-11-02 Thread Martin Böhme via cfe-commits
This revision was automatically updated to reflect the committed changes. mboehme marked 2 inline comments as done. Closed by commit rL285842: [clang-tidy] Extend misc-use-after-move to support unique_ptr and shared_ptr. (authored by mboehme). Changed prior to commit:

[PATCH] D26041: [clang-tidy] Extend misc-use-after-move to support unique_ptr and shared_ptr.

2016-11-01 Thread Martin Böhme via cfe-commits
mboehme marked 4 inline comments as done. mboehme added a comment. Please take another look. Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:467 +StringRef getName(const NamedDecl *ND) { + if (!ND->getIdentifier()) +return StringRef(); aaron.ballman

[PATCH] D26041: [clang-tidy] Extend misc-use-after-move to support unique_ptr and shared_ptr.

2016-11-01 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 76655. mboehme added a comment. - Responses to reviewer comments https://reviews.llvm.org/D26041 Files: clang-tidy/misc/UseAfterMoveCheck.cpp docs/clang-tidy/checks/misc-use-after-move.rst test/clang-tidy/misc-use-after-move.cpp Index:

[PATCH] D26041: [clang-tidy] Extend misc-use-after-move to support unique_ptr and shared_ptr.

2016-10-27 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: alexfh. mboehme added a subscriber: cfe-commits. As a unique_ptr or shared_ptr that has been moved from is guaranteed to be null, we only warn if the pointer is dereferenced. https://reviews.llvm.org/D26041 Files:

[PATCH] D25612: [clang-tidy] Add additional diagnostic to misc-use-after-move

2016-10-14 Thread Martin Böhme via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284235: [clang-tidy] Add additional diagnostic to misc-use-after-move (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D25612?vs=74671=74673#toc Repository: rL LLVM

[PATCH] D25612: [clang-tidy] Add additional diagnostic to misc-use-after-move

2016-10-14 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 74671. mboehme added a comment. - Responses to reviewer comments https://reviews.llvm.org/D25612 Files: clang-tidy/misc/UseAfterMoveCheck.cpp test/clang-tidy/misc-use-after-move.cpp Index: test/clang-tidy/misc-use-after-move.cpp

[PATCH] D25612: [clang-tidy] Add additional diagnostic to misc-use-after-move

2016-10-14 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: hokein. mboehme added a subscriber: cfe-commits. This adds a diagnostic to the misc-use-after-move check that is output when the use happens on a later loop iteration than the move, for example: A a; for (int i = 0; i < 10; ++i) {

Re: [PATCH] D24962: [ASTMatchers] Let registerMatcher() take a const char * instead of a StringRef

2016-09-27 Thread Martin Böhme via cfe-commits
mboehme abandoned this revision. mboehme added a comment. Abandoning after discussion with klimek. https://reviews.llvm.org/D24962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24962: [ASTMatchers] Let registerMatcher() take a const char * instead of a StringRef

2016-09-27 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: klimek. mboehme added a subscriber: cfe-commits. Herald added a subscriber: klimek. r282433 added LLVM_ATTRIBUTE_ALWAYS_INLINE to the StringRef(const char *) constructor. This causes the size of the stack frame for

Re: [PATCH] D24561: [clang-tidy] Add dependency on clangAnalysis to clangTidyMiscModule

2016-09-14 Thread Martin Böhme via cfe-commits
mboehme added a comment. Thanks! Repository: rL LLVM https://reviews.llvm.org/D24561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24561: [clang-tidy] Add dependency on clangAnalysis to clangTidyMiscModule

2016-09-14 Thread Martin Böhme via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281460: [clang-tidy] Add dependency on clangAnalysis to clangTidyMiscModule (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D24561?vs=71345=71346#toc Repository: rL LLVM

Re: [PATCH] D24561: [clang-tidy] Add dependency on clangAnalysis to clangTidyMiscModule

2016-09-14 Thread Martin Böhme via cfe-commits
mboehme added a comment. Trivial build fix, will submit without review. https://reviews.llvm.org/D24561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24561: [clang-tidy] Add dependency on clangAnalysis to clangTidyMiscModule

2016-09-14 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a subscriber: cfe-commits. Herald added subscribers: mgorny, beanz. This is needed for the recently submitted misc-use-after-move check (rL281453). For some reason, this still built under Linux, but it caused the PPC build bot to fail.

Re: [clang-tools-extra] r281453 - [clang-tidy] Add check 'misc-use-after-move'

2016-09-14 Thread Martin Böhme via cfe-commits
> > While I'm excited to see this go in anywhere, I have to say I'm a bit sad > it isn't going in as a warning and instead inside clang-tidy. This has been > a much requested warning from Clang for many years. > > Is there a concise description of why this design was chosen? Are there > specific

Re: [PATCH] D24550: [clang-tidy] Make test for misc-use-after-move pass under Windows

2016-09-14 Thread Martin Böhme via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281455: [clang-tidy] Make test for misc-use-after-move pass under Windows (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D24550?vs=71318=71319#toc Repository: rL LLVM

Re: [PATCH] D24550: [clang-tidy] Make test for misc-use-after-move pass under Windows

2016-09-14 Thread Martin Böhme via cfe-commits
mboehme added a comment. Single-line trivial change, will submit without review. Please let me know if you have any objections. https://reviews.llvm.org/D24550 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D24550: [clang-tidy] Make test for misc-use-after-move pass under Windows

2016-09-14 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: alexfh. mboehme added a subscriber: cfe-commits. Adds -fno-delayed-template-parsing https://reviews.llvm.org/D24550 Files: test/clang-tidy/misc-use-after-move.cpp Index: test/clang-tidy/misc-use-after-move.cpp

Re: [PATCH] D23842: [CFG] Add iterator_ranges to CFG and CFGBlock.

2016-09-12 Thread Martin Böhme via cfe-commits
This revision was automatically updated to reflect the committed changes. mboehme marked an inline comment as done. Closed by commit rL281200: [CFG] Add iterator_ranges to CFG and CFGBlock. (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D23842?vs=69129=70981#toc

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

2016-08-30 Thread Martin Böhme via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280077: [clang-tidy] Add check 'misc-move-forwarding-reference' (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D0?vs=69665=69666#toc Repository: rL LLVM

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

2016-08-30 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 69665. mboehme added a comment. Update to current head https://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MoveForwardingReferenceCheck.cpp

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

2016-08-30 Thread Martin Böhme via cfe-commits
mboehme marked an inline comment as done. mboehme added a comment. https://reviews.llvm.org/D0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-08-30 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 69662. mboehme added a comment. Fix typo https://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MoveForwardingReferenceCheck.cpp clang-tidy/misc/MoveForwardingReferenceCheck.h

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

2016-08-26 Thread Martin Böhme via cfe-commits
mboehme marked an inline comment as done. mboehme added a comment. Any more comments here? https://reviews.llvm.org/D0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-08-25 Thread Martin Böhme via cfe-commits
mboehme marked 9 inline comments as done. mboehme added a comment. > > > 2. Also it would be good to make link in cppcoreguidelines. > > > > > > > > > How exactly would I create such a "link"? Are you just thinking of a link > > in the documentation, or is there a way to have one

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

2016-08-25 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 69206. mboehme added a comment. Responses to reviewer comments. https://reviews.llvm.org/D23353 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/UseAfterMoveCheck.cpp clang-tidy/misc/UseAfterMoveCheck.h

Re: [PATCH] D23842: [CFG] Add iterator_ranges to CFG and CFGBlock.

2016-08-24 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 69129. mboehme added a comment. Re-add inadvertently deleted blank line https://reviews.llvm.org/D23842 Files: include/clang/Analysis/CFG.h Index: include/clang/Analysis/CFG.h === ---

[PATCH] D23842: [CFG] Add iterator_ranges to CFG and CFGBlock.

2016-08-24 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: alexfh. mboehme added a subscriber: cfe-commits. (Needed for D23353.) https://reviews.llvm.org/D23842 Files: include/clang/Analysis/CFG.h Index: include/clang/Analysis/CFG.h

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

2016-08-17 Thread Martin Böhme via cfe-commits
mboehme marked 2 inline comments as done. Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:659 @@ +658,3 @@ + UseAfterMove Use; + if (finder.find(FunctionBody, MovingCall, MovedVariable, )) { +emitDiagnostic(MovingCall, MovedVariable, Use, this, Result.Context);

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

2016-08-17 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 68366. mboehme added a comment. Remove braces around another single-line if statement block https://reviews.llvm.org/D23353 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/UseAfterMoveCheck.cpp

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

2016-08-17 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 68365. mboehme added a comment. Remove braces around single-line bodies of if statements https://reviews.llvm.org/D23353 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/UseAfterMoveCheck.cpp

Re: [PATCH] D23543: Adapt to TraverseLambdaCapture interface change from D23204

2016-08-17 Thread Martin Böhme via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL278934: Adapt to TraverseLambdaCapture interface change from D23204 (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D23543?vs=68138=68358#toc Repository: rL LLVM

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

2016-08-17 Thread Martin Böhme via cfe-commits
This revision was automatically updated to reflect the committed changes. mboehme marked an inline comment as done. Closed by commit rL278933: Visit lambda capture inits from RecursiveASTVisitor::TraverseLambdaCapture(). (authored by mboehme). Changed prior to commit:

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

2016-08-17 Thread Martin Böhme via cfe-commits
mboehme marked 3 inline comments as done. Comment at: unittests/Tooling/RecursiveASTVisitorTestExprVisitor.cpp:239 @@ +238,3 @@ + EXPECT_TRUE(Visitor.runOver( +"void f() { int i; [a = i + 1]{}; }", +DeclRefExprVisitor::Lang_CXX14)); alexfh wrote: > So,

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

2016-08-17 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 68352. mboehme marked an inline comment as done. mboehme added a comment. Changes in response to reviewer comments https://reviews.llvm.org/D23204 Files: include/clang/AST/RecursiveASTVisitor.h lib/Index/IndexBody.cpp

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

2016-08-17 Thread Martin Böhme via cfe-commits
mboehme marked 2 inline comments as done. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:46-56 @@ +45,13 @@ +// std::move(). This will hopefully prevent erroneous replacements if the +// code does unusual things (e.g. create an alias for std::move() in +

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

2016-08-16 Thread Martin Böhme via cfe-commits
mboehme marked 4 inline comments as done. mboehme added a comment. In https://reviews.llvm.org/D23353#511362, @Prazek wrote: > 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

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

2016-08-16 Thread Martin Böhme via cfe-commits
mboehme marked 9 inline comments as done. Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:493 @@ +492,3 @@ +if (!S) + continue; + For some reason, I thought I had read that they weren't compatible with CFG / CFGBlock -- but obviously I must have been

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

2016-08-16 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 68147. mboehme added a comment. Responses to reviewer comments. https://reviews.llvm.org/D23353 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/UseAfterMoveCheck.cpp clang-tidy/misc/UseAfterMoveCheck.h

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

2016-08-16 Thread Martin Böhme via cfe-commits
mboehme marked 2 inline comments as done. 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; klimek wrote: > I'd rather pass in the

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

2016-08-16 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 68139. mboehme added a comment. Update to a clean diff. (Sorry, the last diff included a large number of extraneous changes by others.) https://reviews.llvm.org/D23204 Files: include/clang/AST/RecursiveASTVisitor.h lib/Index/IndexBody.cpp

[PATCH] D23543: Adapt to TraverseLambdaCapture interface change from D23204

2016-08-16 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: alexfh. mboehme added a subscriber: cfe-commits. mboehme added a dependency: D23204: Visit lambda capture inits from RecursiveASTVisitor::TraverseLambdaCapture().. Depends on D23204. This is intended to be submitted immediately after

Re: [PATCH] D23448: [ASTMatchers] Add templateTypeParmDecl() to Registry.cpp

2016-08-12 Thread Martin Böhme via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL278507: [ASTMatchers] Add templateTypeParmDecl() to Registry.cpp (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D23448?vs=67831=67832#toc Repository: rL LLVM

[PATCH] D23448: [ASTMatchers] Add templateTypeParmDecl() to Registry.cpp

2016-08-12 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: alexfh. mboehme added a subscriber: cfe-commits. Herald added subscribers: samparker, rengolin, aemerson, klimek. This appears to have been forgotten when templateTypeParmDecl() was initially added. https://reviews.llvm.org/D23448 Files:

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

2016-08-12 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 67829. mboehme marked 2 inline comments as done. mboehme added a comment. Fix typo in comment https://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MoveForwardingReferenceCheck.cpp

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

2016-08-12 Thread Martin Böhme via cfe-commits
mboehme added inline comments. Comment at: test/clang-tidy/misc-move-forwarding-reference.cpp:50 @@ +49,3 @@ +// operator. +template void f5(U &) { + { Sorry, that should have been "scope resolution operator". Comment changed. What this is trying to test is

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

2016-08-12 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 67830. mboehme added a comment. Restore spaces around scope resolution operator in test case https://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MoveForwardingReferenceCheck.cpp

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

2016-08-12 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 67828. mboehme added a comment. Handle case where the forwarding reference is a parameter of a generic lambda. https://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp

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

[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] 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] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-05 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 66914. mboehme marked 2 inline comments as done. mboehme added a comment. Renamed canReferToDecl to hasAnyDeclaration. This is for consistency with the corresponding change in https://reviews.llvm.org/D23004. https://reviews.llvm.org/D0

Re: [PATCH] D23004: [ASTMatchers] Add matchers canReferToDecl() and hasUnderlyingDecl()

2016-08-05 Thread Martin Böhme via cfe-commits
mboehme marked 5 inline comments as done. mboehme added a comment. https://reviews.llvm.org/D23004 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23004: [ASTMatchers] Add matchers canReferToDecl() and hasUnderlyingDecl()

2016-08-05 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 66912. mboehme added a comment. - Rename canReferToDecl to hasAnyDeclaration https://reviews.llvm.org/D23004 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp

Re: [PATCH] D23004: [ASTMatchers] Add matchers canReferToDecl() and hasUnderlyingDecl()

2016-08-04 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 66815. mboehme added a comment. Removed superfluous parentheses https://reviews.llvm.org/D23004 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp

Re: [PATCH] D23004: [ASTMatchers] Add matchers canReferToDecl() and hasUnderlyingDecl()

2016-08-04 Thread Martin Böhme via cfe-commits
mboehme marked an inline comment as done. Comment at: include/clang/ASTMatchers/ASTMatchers.h:2486 @@ +2485,3 @@ + + return (UnderlyingDecl != nullptr && + InnerMatcher.matches(*UnderlyingDecl, Finder, Builder)); I was trying to match the style of the

Re: [PATCH] D23004: [ASTMatchers] Add matchers canReferToDecl() and hasUnderlyingDecl()

2016-08-04 Thread Martin Böhme via cfe-commits
mboehme added a comment. I've rebased the patch to a newer head revision, which seems to confuse Phabricator when diffing against earlier versions of the patch. Apologies. I assume this means I should avoid doing this (rebasing to a newer revision)? https://reviews.llvm.org/D23004

Re: [PATCH] D23004: [ASTMatchers] Add matchers canReferToDecl() and hasUnderlyingDecl()

2016-08-04 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 66808. https://reviews.llvm.org/D23004 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp unittests/ASTMatchers/ASTMatchersTraversalTest.cpp Index:

Re: [PATCH] D22903: [clang-tidy] Prepare modernize-loop-convert for upcoming changes in D22566

2016-08-01 Thread Martin Böhme via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL277339: [clang-tidy] Prepare modernize-loop-convert for upcoming changes in D22566 (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D22903?vs=65877=66303#toc Repository: rL

Re: [PATCH] D23004: [ASTMatchers] Add matchers canReferToDecl() and hasUnderlyingDecl()

2016-08-01 Thread Martin Böhme via cfe-commits
mboehme added reviewers: sbenza, aaron.ballman. mboehme updated this revision to Diff 66291. mboehme added a comment. Updated test and documentation for hasUnderlyingDecl() to use using declarations instead of typedefs. (I made the mistaken assumption that getUnderlyingDecl() would also work on

Re: [PATCH] D23004: [ASTMatchers] Add matchers canReferToDecl() and hasUnderlyingDecl()

2016-08-01 Thread Martin Böhme via cfe-commits
mboehme added a comment. Retracting from review for the moment. Tests fail to compile (embarrasingly enough, I ran the wrong test suite -- apologies). https://reviews.llvm.org/D23004 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2016-08-01 Thread Martin Böhme via cfe-commits
mboehme marked 7 inline comments as done. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:93 @@ +92,3 @@ + hasArgument(0, ignoringParenImpCasts(declRefExpr( + to(ForwardingReferenceParmMatcher) +

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

2016-08-01 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 66284. mboehme marked 3 inline comments as done. https://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MoveForwardingReferenceCheck.cpp clang-tidy/misc/MoveForwardingReferenceCheck.h

[PATCH] D23004: [ASTMatchers] Add matchers canReferToDecl() and hasUnderlyingDecl()

2016-08-01 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added reviewers: aaron.ballman, sbenza. mboehme added a subscriber: cfe-commits. Herald added a subscriber: klimek. Required for D0 https://reviews.llvm.org/D23004 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h

Re: [PATCH] D22566: Make RecursiveASTVisitor visit lambda capture initialization expressions

2016-07-28 Thread Martin Böhme via cfe-commits
mboehme added a comment. This was reverted in https://reviews.llvm.org/rL276759 because it broke modernize-loop-convert. https://reviews.llvm.org/D22903 contains a fix for the modernize-loop-convert issue. Will re-submit this patch once https://reviews.llvm.org/D22903 has landed.

[PATCH] D22903: [clang-tidy] Prepare modernize-loop-convert for upcoming changes in D22566

2016-07-28 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: klimek. mboehme added a subscriber: cfe-commits. D22566 will change RecursiveASTVisitor so that it descends into the initialization expressions for lambda captures. modernize-loop-convert needs to be prepared for this so that it does not

Re: [PATCH] D22566: Make RecursiveASTVisitor visit lambda capture initialization expressions

2016-07-26 Thread Martin Böhme via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL276755: Make RecursiveASTVisitor visit lambda capture initialization expressions (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D22566?vs=64665=65526#toc Repository: rL

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

2016-07-26 Thread Martin Böhme via cfe-commits
mboehme marked 13 inline comments as done. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:20 @@ +19,3 @@ + +static void ReplaceMoveWithForward(const UnresolvedLookupExpr *Callee, + const TemplateTypeParmType *TypeParmType,

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

2016-07-26 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 65484. mboehme marked an inline comment as done. mboehme added a comment. Changes in response to reviewer comments https://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp

[PATCH] D22566: Make RecursiveASTVisitor visit lambda capture initialization expressions

2016-07-20 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: klimek. mboehme added a subscriber: cfe-commits. Herald added a subscriber: klimek. Lambda capture initializations are part of the explicit source code and therefore should be visited by default but, so far, RecursiveASTVisitor does not

[PATCH] D22359: [OpenCL] In test/Driver/opencl.cl, don't require name of Clang binary to contain "clang"

2016-07-14 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: bkramer. mboehme added a subscriber: cfe-commits. The test currently fails if the name of the Clang binary doesn't contain "clang". This patch removes that requirement, as some environments may choose to run the test with a differently

Re: [PATCH] D22170: [OpenCL] Fixes opencl.cl testcase issues and cl-strict-aliasing only allowed with cl-std=CL

2016-07-14 Thread Martin Böhme via cfe-commits
mboehme added a comment. Fix submitted Repository: rL LLVM https://reviews.llvm.org/D22170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22170: [OpenCL] Fixes opencl.cl testcase issues and cl-strict-aliasing only allowed with cl-std=CL

2016-07-14 Thread Martin Böhme via cfe-commits
mboehme added a comment. Fix in review at https://reviews.llvm.org/D22349 Repository: rL LLVM https://reviews.llvm.org/D22170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D22349: [OpenCL] Actually activate Frontend/opencl.cl test and fix test bugs

2016-07-14 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: bkramer. mboehme added subscribers: cfe-commits, ashi1. rL275318 added the test Frontend/opencl.cl test, but that test was never actually run because Frontend/lit.local.cfg doesn't contain the '.cl' file suffix. Once the test is

Re: [PATCH] D22170: [OpenCL] Fixes opencl.cl testcase issues and cl-strict-aliasing only allowed with cl-std=CL

2016-07-14 Thread Martin Böhme via cfe-commits
mboehme added a subscriber: mboehme. mboehme added a comment. The test cfe/trunk/test/Frontend/opencl.cl that was added here appears to fail. Running "ninja check-clang" doesn't pick this up because cfe/trunk/test/Frontend/lit.local.cfg doesn't contain '.cl' as a file suffix: config.suffixes =

Re: [PATCH] D22263: [clang-tidy] Fix syntax error in modernize-use-emplace.rst

2016-07-13 Thread Martin Böhme via cfe-commits
mboehme abandoned this revision. mboehme added a comment. Good to hear -- abandoning this patch then. http://reviews.llvm.org/D22263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-07-12 Thread Martin Böhme via cfe-commits
mboehme marked 5 inline comments as done. mboehme added a comment. In http://reviews.llvm.org/D0#480415, @mgehre wrote: > Nice check. This should be mentioned in docs/ReleaseNotes.rst Done. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:34 @@ +33,3 @@ + if

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

2016-07-12 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 63663. mboehme added a comment. Addressed Prazek's review comments. http://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MoveForwardingReferenceCheck.cpp

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

2016-07-11 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: sbenza. mboehme added a subscriber: cfe-commits. The check emits a warning if std::move() is applied to a forwarding reference, i.e. an rvalue reference of a function template argument type. If a developer is unaware of the special rules

Re: [PATCH] D21895: CFGBuilder: Fix crash when visiting a range-based for over a dependent type

2016-06-30 Thread Martin Böhme via cfe-commits
mboehme marked an inline comment as done. mboehme added a comment. http://reviews.llvm.org/D21895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21895: CFGBuilder: Fix crash when visiting a range-based for over a dependent type

2016-06-30 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 62374. http://reviews.llvm.org/D21895 Files: lib/Analysis/CFG.cpp unittests/Analysis/CFGTest.cpp unittests/Analysis/CMakeLists.txt unittests/CMakeLists.txt Index: unittests/CMakeLists.txt

[PATCH] D21895: CFGBuilder: Fix crash when visiting a range-based for over a dependent type

2016-06-30 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: klimek. mboehme added a subscriber: cfe-commits. CFG generation is expected to fail in this case, but it should not crash. Also added a test that reproduces the crash. http://reviews.llvm.org/D21895 Files: lib/Analysis/CFG.cpp

[PATCH] D21799: [ASTMatchers] Add missing forEachArgumentWithParam() to code sample

2016-06-28 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: klimek. mboehme added a subscriber: cfe-commits. Herald added a subscriber: klimek. http://reviews.llvm.org/D21799 Files: include/clang/ASTMatchers/ASTMatchers.h Index: include/clang/ASTMatchers/ASTMatchers.h

[PATCH] D21366: [clang-tidy] misc-move-const-arg: Fix typos

2016-06-15 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: alexfh. mboehme added a subscriber: cfe-commits. http://reviews.llvm.org/D21366 Files: clang-tidy/misc/MoveConstantArgumentCheck.cpp clang-tidy/misc/MoveConstantArgumentCheck.h Index: clang-tidy/misc/MoveConstantArgumentCheck.h

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-14 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 60686. http://reviews.llvm.org/D21223 Files: clang-tidy/misc/MoveConstantArgumentCheck.cpp docs/clang-tidy/checks/misc-move-const-arg.rst test/clang-tidy/misc-move-const-arg.cpp Index: test/clang-tidy/misc-move-const-arg.cpp

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-14 Thread Martin Böhme via cfe-commits
mboehme added inline comments. Comment at: test/clang-tidy/misc-move-const-arg.cpp:75-76 @@ +74,4 @@ + +struct NonMoveable { + public: + NonMoveable(); aaron.ballman wrote: > This type isn't non-moveable. For that, you need to explicitly delete the > move

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-14 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 60671. http://reviews.llvm.org/D21223 Files: clang-tidy/misc/MoveConstantArgumentCheck.cpp docs/clang-tidy/checks/misc-move-const-arg.rst test/clang-tidy/misc-move-const-arg.cpp Index: test/clang-tidy/misc-move-const-arg.cpp

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-13 Thread Martin Böhme via cfe-commits
mboehme added inline comments. Comment at: clang-tidy/misc/MoveConstantArgumentCheck.cpp:37 @@ +36,3 @@ + if (BeforeArgumentsRange.isValid() && AfterArgumentsRange.isValid()) { +(*Diag) << FixItHint::CreateRemoval(BeforeArgumentsRange) +<<

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-13 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 60507. http://reviews.llvm.org/D21223 Files: clang-tidy/misc/MoveConstantArgumentCheck.cpp docs/clang-tidy/checks/misc-move-const-arg.rst test/clang-tidy/misc-move-const-arg.cpp Index: test/clang-tidy/misc-move-const-arg.cpp

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-13 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 60506. http://reviews.llvm.org/D21223 Files: clang-tidy/misc/MoveConstantArgumentCheck.cpp docs/clang-tidy/checks/misc-move-const-arg.rst test/clang-tidy/misc-move-const-arg.cpp Index: test/clang-tidy/misc-move-const-arg.cpp

[PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-10 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added reviewers: alexfh, hokein. mboehme added a subscriber: cfe-commits. Conceptually, this is very close to the existing functionality of misc-move-const-arg, which is why I'm adding it here and not creating a new check. For example, for a type A that is