Page MenuHomePhabricator
Feed Advanced Search

Jun 6 2016

sbenza added a comment to D21036: Misplaced const-qualification with typedef types.

I think this would be more interesting with macros.
Eg triggering in code like this:

Jun 6 2016, 1:03 PM
sbenza committed rL271896: [clang-tidy] Do not try to suggest a fix if the parameter is partially in a….
[clang-tidy] Do not try to suggest a fix if the parameter is partially in a…
Jun 6 2016, 7:27 AM

Jun 2 2016

sbenza added a comment to D20917: [clang-tidy] modernize-use-auto: don't remove stars by default.

Is it a typo in the description when it says that when RemoveStar is on we will write 'auto*' instead if 'auto'?

Jun 2 2016, 9:35 AM

Jun 1 2016

sbenza committed rL271426: Fix uninitialized memory access when the token 'const' is not present in.
Fix uninitialized memory access when the token 'const' is not present in
Jun 1 2016, 1:44 PM

May 31 2016

sbenza added inline comments to D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved..
May 31 2016, 8:18 AM

May 25 2016

sbenza committed rL270714: Speed up check by using a recursive visitor..
Speed up check by using a recursive visitor.
May 25 2016, 9:25 AM
sbenza closed D20597: Speed up check by using a recursive visitor. by committing rL270714: Speed up check by using a recursive visitor..
May 25 2016, 9:25 AM
sbenza updated the diff for D20597: Speed up check by using a recursive visitor..

Reformat code

May 25 2016, 9:17 AM

May 24 2016

sbenza retitled D20597: Speed up check by using a recursive visitor. from to Speed up check by using a recursive visitor..
May 24 2016, 1:51 PM

May 23 2016

sbenza added inline comments to D19324: [ASTMatchers] new forEachOverriden matcher.
May 23 2016, 8:30 AM

May 16 2016

sbenza added inline comments to D20277: [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved..
May 16 2016, 12:50 PM

May 10 2016

sbenza added inline comments to D19871: Add an AST matcher for CastExpr kind.
May 10 2016, 2:10 PM

May 5 2016

sbenza added inline comments to D19871: Add an AST matcher for CastExpr kind.
May 5 2016, 7:50 AM

May 4 2016

sbenza committed rL268548: Fix the doc extraction script to work with hasAnyName and with equalsNode..
Fix the doc extraction script to work with hasAnyName and with equalsNode.
May 4 2016, 1:51 PM

May 3 2016

sbenza committed rL268430: [clang-tidy] Speedup misc-static-assert..
[clang-tidy] Speedup misc-static-assert.
May 3 2016, 1:17 PM
sbenza closed D19877: [clang-tidy] Speedup misc-static-assert. by committing rL268430: [clang-tidy] Speedup misc-static-assert..
May 3 2016, 1:17 PM
sbenza retitled D19877: [clang-tidy] Speedup misc-static-assert. from to [clang-tidy] Speedup misc-static-assert..
May 3 2016, 11:11 AM
sbenza added a comment to D19871: Add an AST matcher for CastExpr kind.

So even if the above solution is working, we still need to call it that way (as a string):
clang-query> match castExpr(hasCastKind("CK_Dependent"))

Correct, that's expected behavior for clang-query (though I would love if someday we could expose actual enumerations somehow instead of string literals).

May 3 2016, 11:07 AM
sbenza added a comment to D19871: Add an AST matcher for CastExpr kind.

Is this required for some purpose?

It's used in clang-tidy checkers.

see http://reviews.llvm.org/D19841

It's good to have that context in a review for functionality that isn't part of the proposed patch. :-) Looking at the other patch, I would prefer to keep this matcher narrowed to just clang-tidy unless you can also solve how to expose it via the dynamic registry so that it can be used by tools like clang-query.

May 3 2016, 8:42 AM

Apr 29 2016

sbenza accepted D19357: [ASTMatchers] New matcher forFunction.
Apr 29 2016, 10:42 AM

Apr 27 2016

sbenza accepted D18265: [clang-tidy] New: checker misc-unconventional-assign-operator replacing misc-assign-operator-signature.
Apr 27 2016, 7:46 AM

Apr 26 2016

sbenza added inline comments to D19324: [ASTMatchers] new forEachOverriden matcher.
Apr 26 2016, 9:57 AM
sbenza added inline comments to D18265: [clang-tidy] New: checker misc-unconventional-assign-operator replacing misc-assign-operator-signature.
Apr 26 2016, 9:08 AM

Apr 21 2016

sbenza accepted D19379: [clang-tidy] Fix broken build bot..
Apr 21 2016, 11:20 AM
sbenza added inline comments to D19324: [ASTMatchers] new forEachOverriden matcher.
Apr 21 2016, 10:31 AM
sbenza added a comment to D19357: [ASTMatchers] New matcher forFunction.

Thanks for doing this!

Apr 21 2016, 7:55 AM

Apr 19 2016

sbenza added a comment to D19144: Handle TemplateArgument in DynTypedNode comparison operations..

We can proceed with this change if you want, but it is not required anymore. I don't know whether we need the extra complexity of TemplateArgumentLess.

If this patch is not going to help with performance, I'm happy to abandon it.

Apr 19 2016, 10:11 AM
sbenza committed rL266748: [ASTMatchers] Do not try to memoize nodes we can't compare..
[ASTMatchers] Do not try to memoize nodes we can't compare.
Apr 19 2016, 8:58 AM
sbenza closed D19231: [ASTMatchers] Do not try to memoize nodes we can't compare. by committing rL266748: [ASTMatchers] Do not try to memoize nodes we can't compare..
Apr 19 2016, 8:58 AM

Apr 18 2016

sbenza added a comment to D19144: Handle TemplateArgument in DynTypedNode comparison operations..

Sent http://reviews.llvm.org/D19231 to fix the underlying bug in hasAncestor.
We can proceed with this change if you want, but it is not required anymore. I don't know whether we need the extra complexity of TemplateArgumentLess.

Apr 18 2016, 12:24 PM
sbenza retitled D19231: [ASTMatchers] Do not try to memoize nodes we can't compare. from to [ASTMatchers] Do not try to memoize nodes we can't compare..
Apr 18 2016, 11:33 AM

Apr 15 2016

sbenza added a comment to D19144: Handle TemplateArgument in DynTypedNode comparison operations..

To be more specific, the problem comes from the use of hasAnscestor (done by isInTemplateInstantiation ) while there is a TemplateArgument in the bound nodes.
This tries to put the node into the cache.
To trigger this easily you only need to have a hit in the cache.
I think you can trigger it by adding a second line boost::lexical_cast<std::string>(42); in the string_as_T test. That second hit should get a cache hit and trigger the bug.

Apr 15 2016, 1:19 PM
sbenza added a comment to D19144: Handle TemplateArgument in DynTypedNode comparison operations..

I think the bug is coming from memoizedMatchesAncestorOfRecursively.
memoizedMatchesRecursively has a special case at the top to skip the cache if the node is not sortable. The other function should do that too.
Although the check is stale also because it is only checking for memoizationData and not whether the node itself works for < and ==.

Apr 15 2016, 1:06 PM

Apr 14 2016

sbenza committed rL266369: [clang-tidy] Add check misc-multiple-statement-macro.
[clang-tidy] Add check misc-multiple-statement-macro
Apr 14 2016, 2:21 PM
sbenza closed D18766: [clang-tidy] Add check misc-multiple-statement-macro by committing rL266369: [clang-tidy] Add check misc-multiple-statement-macro.
Apr 14 2016, 2:21 PM

Apr 13 2016

sbenza added inline comments to D18265: [clang-tidy] New: checker misc-unconventional-assign-operator replacing misc-assign-operator-signature.
Apr 13 2016, 12:30 PM
sbenza accepted D19059: Reorder ASTNodeKind::AllKindInfo to match NodeKindId..
Apr 13 2016, 8:45 AM
sbenza added a comment to D19059: Reorder ASTNodeKind::AllKindInfo to match NodeKindId..

Those tests are testing the code completion you get in clang-query.
The type list must match what that matcher supports.

Apr 13 2016, 8:27 AM

Apr 12 2016

sbenza added inline comments to D18766: [clang-tidy] Add check misc-multiple-statement-macro.
Apr 12 2016, 8:13 AM
sbenza updated the diff for D18766: [clang-tidy] Add check misc-multiple-statement-macro.

Change warning message.

Apr 12 2016, 8:13 AM
sbenza added inline comments to D18914: [clang-tidy] new readability-redundant-inline.
Apr 12 2016, 8:10 AM

Apr 11 2016

sbenza added inline comments to D18914: [clang-tidy] new readability-redundant-inline.
Apr 11 2016, 9:29 AM

Apr 7 2016

sbenza added inline comments to D18265: [clang-tidy] New: checker misc-unconventional-assign-operator replacing misc-assign-operator-signature.
Apr 7 2016, 10:51 AM

Apr 5 2016

sbenza added inline comments to D18766: [clang-tidy] Add check misc-multiple-statement-macro.
Apr 5 2016, 9:07 AM
sbenza updated the diff for D18766: [clang-tidy] Add check misc-multiple-statement-macro.

Minor fixes

Apr 5 2016, 9:06 AM
sbenza added inline comments to D18265: [clang-tidy] New: checker misc-unconventional-assign-operator replacing misc-assign-operator-signature.
Apr 5 2016, 8:13 AM

Apr 4 2016

sbenza added inline comments to D18766: [clang-tidy] Add check misc-multiple-statement-macro.
Apr 4 2016, 2:18 PM
sbenza updated the diff for D18766: [clang-tidy] Add check misc-multiple-statement-macro.

Minor fixes

Apr 4 2016, 2:18 PM
sbenza retitled D18766: [clang-tidy] Add check misc-multiple-statement-macro from to [clang-tidy] Add check misc-multiple-statement-macro.
Apr 4 2016, 11:27 AM
sbenza added a comment to D18191: [clang-tidy] Add check for function parameters that are const& to builtin types.

At least in my codebase, skipping templates is too strong. I run across ones where the const& parameter is not one controlled by a template. It's often a size_t.

Apr 4 2016, 8:51 AM
sbenza added a comment to D18191: [clang-tidy] Add check for function parameters that are const& to builtin types.

As Alex mentioned, we have a test like this.
It also adds a hardcoded list of user-defined types that are known to be better when passed by value (eg. StringRef)

Apr 4 2016, 7:44 AM

Apr 1 2016

sbenza added inline comments to D18265: [clang-tidy] New: checker misc-unconventional-assign-operator replacing misc-assign-operator-signature.
Apr 1 2016, 6:46 AM

Mar 30 2016

sbenza added a comment to D17811: [clang-tidy] Add check to detect dangling references in value handlers..

This is already being done in http://reviews.llvm.org/D18582

Mar 30 2016, 11:57 AM

Mar 29 2016

sbenza committed rL264759: [clang-tidy] Add check to detect dangling references in value handlers..
[clang-tidy] Add check to detect dangling references in value handlers.
Mar 29 2016, 11:08 AM
sbenza closed D17811: [clang-tidy] Add check to detect dangling references in value handlers. by committing rL264759: [clang-tidy] Add check to detect dangling references in value handlers..
Mar 29 2016, 11:07 AM
sbenza added a comment to D18475: [clang-tidy] Add more detection rules for redundant c_str calls..

Looks good to me. Adding Samuel, since he has done a lot of similar stuff by now and might have good ideas on improving this and making this more general.

Mar 29 2016, 10:38 AM

Mar 25 2016

sbenza updated the diff for D17811: [clang-tidy] Add check to detect dangling references in value handlers..

Using new public hasAnyName API.

Mar 25 2016, 2:17 PM
sbenza committed rL264453: [ASTMatchers] Don't use brace-init lists..
[ASTMatchers] Don't use brace-init lists.
Mar 25 2016, 12:46 PM
sbenza committed rL264428: [ASTMatchers] Fix build for VariadicFunction..
[ASTMatchers] Fix build for VariadicFunction.
Mar 25 2016, 10:51 AM
sbenza committed rL264417: [ASTMatchers] Add own version of VariadicFunction..
[ASTMatchers] Add own version of VariadicFunction.
Mar 25 2016, 9:34 AM
sbenza closed D18275: [ASTMatchers] Add own version of VariadicFunction. by committing rL264417: [ASTMatchers] Add own version of VariadicFunction..
Mar 25 2016, 9:34 AM

Mar 23 2016

sbenza added inline comments to D18275: [ASTMatchers] Add own version of VariadicFunction..
Mar 23 2016, 11:01 AM
sbenza updated the diff for D18275: [ASTMatchers] Add own version of VariadicFunction..

Minor fix

Mar 23 2016, 11:01 AM

Mar 22 2016

sbenza added a comment to D17811: [clang-tidy] Add check to detect dangling references in value handlers..

Do you have commit access? I can apply this patch for you if not.

Mar 22 2016, 10:52 AM

Mar 21 2016

sbenza accepted D18243: [ASTMatchers] Existing matcher hasAnyArgument fixed.
Mar 21 2016, 12:04 PM
sbenza added a comment to D17986: [ASTMatchers] New matcher hasReturnValue added.

I can rerun the script, however it seems it was not executed before the last commit on the master branch, thus if I rerun it then changes will appear in my diff which are not related to my work. What is the exect policy about running this scipt? Should it be rerun before the commit (then it was forgotten by the last committer) or it is executed only before releases?

Mar 21 2016, 12:00 PM
sbenza added a comment to rL263822: [clang-tidy] Use hasAnyName() instead of matchesName()..

Fixed on r263963.
Also added more tests to prevent such omissions in the future.

Mar 21 2016, 11:06 AM
sbenza committed rL263963: [clang-tidy] Fix check broken in rL263822..
[clang-tidy] Fix check broken in rL263822.
Mar 21 2016, 11:05 AM
sbenza added a comment to rL263822: [clang-tidy] Use hasAnyName() instead of matchesName()..

You are right. I'll send a fix for this and add those to the test.

Mar 21 2016, 7:58 AM
sbenza added a comment to D17986: [ASTMatchers] New matcher hasReturnValue added.

Can you rerun the doc script (dump_ast_matchers.py)?

Mar 21 2016, 7:57 AM
sbenza accepted D17986: [ASTMatchers] New matcher hasReturnValue added.
Mar 21 2016, 7:56 AM

Mar 18 2016

sbenza committed rL263822: [clang-tidy] Use hasAnyName() instead of matchesName()..
[clang-tidy] Use hasAnyName() instead of matchesName().
Mar 18 2016, 1:19 PM
sbenza added inline comments to D17986: [ASTMatchers] New matcher hasReturnValue added.
Mar 18 2016, 12:40 PM
sbenza added a comment to D18243: [ASTMatchers] Existing matcher hasAnyArgument fixed.

Please add a test for this.

Mar 18 2016, 12:33 PM
sbenza retitled D18275: [ASTMatchers] Add own version of VariadicFunction. from to [ASTMatchers] Add own version of VariadicFunction..
Mar 18 2016, 12:05 PM
sbenza added a comment to D18275: [ASTMatchers] Add own version of VariadicFunction..

Alex, this is what we discussed to make hasAnyName take a vector<StringRef> directly.

Mar 18 2016, 12:05 PM

Mar 11 2016

sbenza added a comment to D17986: [ASTMatchers] New matcher hasReturnValue added.

I will separate it, OK. In the Clang there is one use case that I fixed, although it did not break the tests. Neither of the other "has..." checkers (except the general ones) ignore implicit casts and parenthesized expressions so this one should not do it either because it makes checking implicit casts impossible.

Mar 11 2016, 11:31 AM
sbenza added a comment to D17986: [ASTMatchers] New matcher hasReturnValue added.

The reason we haven't fixed hasAnyArgument is that it can potentially break its users.
I'd prefer if you separated the fix from the addition.
That way we can revert the fix if needed.

Mar 11 2016, 7:57 AM

Mar 7 2016

sbenza added inline comments to D17811: [clang-tidy] Add check to detect dangling references in value handlers..
Mar 7 2016, 2:50 PM
sbenza updated the diff for D17811: [clang-tidy] Add check to detect dangling references in value handlers..

Minor fixes

Mar 7 2016, 2:50 PM

Mar 3 2016

sbenza added a comment to D17811: [clang-tidy] Add check to detect dangling references in value handlers..

Does it make D17772 obsolete?

Mar 3 2016, 10:54 AM

Mar 2 2016

sbenza updated D17811: [clang-tidy] Add check to detect dangling references in value handlers..
Mar 2 2016, 8:27 AM
sbenza updated subscribers of D17811: [clang-tidy] Add check to detect dangling references in value handlers..
Mar 2 2016, 8:22 AM
sbenza retitled D17811: [clang-tidy] Add check to detect dangling references in value handlers. from to [clang-tidy] Add check to detect dangling references in value handlers..
Mar 2 2016, 8:22 AM

Feb 25 2016

sbenza accepted D17575: Determine if there's a getDecl member function using less hacks.
Feb 25 2016, 7:08 AM

Feb 24 2016

sbenza added a comment to D17575: Determine if there's a getDecl member function using less hacks.

I assume you checked that the new trait works on MSVC.
Aren't both the same type of expression SFINAE? Is somehow one supported but not the other?

Feb 24 2016, 1:14 PM

Feb 22 2016

sbenza committed rL261574: [ASTMatchers] Add matcher hasAnyName..
[ASTMatchers] Add matcher hasAnyName.
Feb 22 2016, 1:17 PM
sbenza closed D17163: [ASTMatchers] Add matcher hasAnyName. by committing rL261574: [ASTMatchers] Add matcher hasAnyName..
Feb 22 2016, 1:17 PM
sbenza accepted D17447: Add check for CERT ENV33-C.
Feb 22 2016, 7:40 AM

Feb 19 2016

sbenza added inline comments to D17447: Add check for CERT ENV33-C.
Feb 19 2016, 12:00 PM
sbenza added inline comments to D17447: Add check for CERT ENV33-C.
Feb 19 2016, 7:57 AM
sbenza edited reviewers for D17163: [ASTMatchers] Add matcher hasAnyName., added: alexfh; removed: klimek.
Feb 19 2016, 7:55 AM

Feb 17 2016

sbenza committed rL261102: [clang-tidy] Match the type against the get() method we are calling,.
[clang-tidy] Match the type against the get() method we are calling,
Feb 17 2016, 8:17 AM

Feb 16 2016

sbenza accepted D17034: Add an AST matcher for null pointers.
Feb 16 2016, 1:03 PM
sbenza added inline comments to D17034: Add an AST matcher for null pointers.
Feb 16 2016, 11:47 AM
sbenza added inline comments to D17034: Add an AST matcher for null pointers.
Feb 16 2016, 9:21 AM

Feb 12 2016

sbenza committed rL260712: [clang-tidy] Add check performance-faster-string-find.
[clang-tidy] Add check performance-faster-string-find
Feb 12 2016, 11:32 AM
sbenza closed D16152: [clang-tidy] Add check performance-faster-string-find by committing rL260712: [clang-tidy] Add check performance-faster-string-find.
Feb 12 2016, 11:32 AM
sbenza updated the diff for D16152: [clang-tidy] Add check performance-faster-string-find.

Minor fix on comment

Feb 12 2016, 8:30 AM
sbenza added inline comments to D17163: [ASTMatchers] Add matcher hasAnyName..
Feb 12 2016, 7:41 AM