Author: sbenza
Date: Mon Jan 15 10:03:20 2018
New Revision: 322497
URL: http://llvm.org/viewvc/llvm-project?rev=322497&view=rev
Log:
[clang-tidy] Expand readability-redundant-smartptr-get to understand implicit
converions to bool in more contexts.
Summary: Expand readability-redundant-smartptr-g
Author: sbenza
Date: Mon Jan 8 07:59:08 2018
New Revision: 322002
URL: http://llvm.org/viewvc/llvm-project?rev=322002&view=rev
Log:
[clang-tidy] Fix DanglingHandleCheck for the correct conversion operation
between basic_string and basic_string_view.
Summary:
Fix DanglingHandleCheck to handle th
sbenza added inline comments.
Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:33
@@ +32,3 @@
+ const auto *Init = Result.Nodes.getNodeAs("init");
+ const auto *Construct =
Result.Nodes.getNodeAs("construct");
+ const auto arguments = Construct->arguments();
---
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 Lang
sbenza added inline comments.
Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:93
@@ +92,3 @@
+ hasArgument(0, ignoringParenImpCasts(declRefExpr(
+ to(ForwardingReferenceParmMatcher)
+ .bind("call-move"),
One of the reasons we added the minimum was because these nodes added
overhead to the matching that was not unnecessary when they only had a
single node.
On the current implementation we could actually get rid of the node
completely for the one argument calls.
I would be ok with removing the lower
sbenza added inline comments.
Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:20
@@ +19,3 @@
+
+static void ReplaceMoveWithForward(const UnresolvedLookupExpr *Callee,
+ const TemplateTypeParmType *TypeParmType,
aaron.
sbenza created this revision.
sbenza added a reviewer: alexfh.
sbenza added a subscriber: cfe-commits.
Add 'included from' details to warning message to
google-global-names-in-headers.
It should make it clearer on those cases where a non-header is being mistakenly
#included.
http://reviews.llvm
Author: sbenza
Date: Tue Jun 28 09:19:41 2016
New Revision: 274019
URL: http://llvm.org/viewvc/llvm-project?rev=274019&view=rev
Log:
[clang-tidy] Do not match on lambdas.
We match on the generated FunctionDecl of the lambda and try to fix it.
This causes a crash.
The right behavior is to ignore l
Author: sbenza
Date: Tue Jun 28 09:08:56 2016
New Revision: 274015
URL: http://llvm.org/viewvc/llvm-project?rev=274015&view=rev
Log:
[ASTMatchers] Add isLambda() matcher.
Modified:
cfe/trunk/docs/LibASTMatchersReference.html
cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h
cfe/trunk/
sbenza added inline comments.
Comment at: clang-tools-extra/trunk/clang-tidy/modernize/UseEmplaceCheck.cpp:34
@@ +33,3 @@
+ hasDeclaration(functionDecl(hasName("push_back"))),
+ on(hasType(cxxRecordDecl(hasAnyName("std::vector", "llvm::SmallVector",
+
sbenza added a comment.
Missing the .rst file.
Did you use the check_clang_tidy.py script to create the template?
Comment at: clang-tidy/performance/EmplaceCheck.cpp:25
@@ +24,3 @@
+ cxxMemberCallExpr(
+ on(expr(hasType(cxxRecordDecl(hasName("std::vector"),
+
sbenza accepted this revision.
This revision is now accepted and ready to land.
Comment at: clang-tidy/misc/MisplacedConstCheck.cpp:22
@@ +21,3 @@
+ Finder->addMatcher(
+ valueDecl(allOf(hasType(isConstQualified()),
+ hasType(typedefType(hasDeclaration(
sbenza added inline comments.
Comment at: clang-tidy/misc/MisplacedConstCheck.cpp:22
@@ +21,3 @@
+ Finder->addMatcher(
+ valueDecl(allOf(hasType(isConstQualified()),
+ hasType(typedefType(hasDeclaration(
allOf() is unnecessary
=
sbenza added a comment.
In http://reviews.llvm.org/D21036#450935, @aaron.ballman wrote:
> In http://reviews.llvm.org/D21036#450106, @sbenza wrote:
>
> > I think this would be more interesting with macros.
> > Eg triggering in code like this:
> >
> > #define FOO(type, op) const type& X = op()
>
sbenza added a comment.
I think this would be more interesting with macros.
Eg triggering in code like this:
#define FOO(type, op) const type& X = op()
FOO(int*, bar);
Comment at: clang-tidy/misc/MisplacedConstCheck.cpp:32
@@ +31,3 @@
+
+static QualType GuessAlternateQualif
Author: sbenza
Date: Mon Jun 6 09:21:11 2016
New Revision: 271896
URL: http://llvm.org/viewvc/llvm-project?rev=271896&view=rev
Log:
[clang-tidy] Do not try to suggest a fix if the parameter is partially in a
macro.
It is not easy to tell where to do the suggestion and whether the
suggestion wil
sbenza added a comment.
Is it a typo in the description when it says that when RemoveStar is on we will
write 'auto*' instead if 'auto'?
http://reviews.llvm.org/D20917
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cg
Author: sbenza
Date: Wed Jun 1 15:37:23 2016
New Revision: 271426
URL: http://llvm.org/viewvc/llvm-project?rev=271426&view=rev
Log:
Fix uninitialized memory access when the token 'const' is not present in
the program.
If the token is not there, we still warn but we don't try to give a
fixit hint
sbenza added inline comments.
Comment at: clang-tidy/performance/UnnecessaryValueParamCheck.cpp:34
@@ -29,1 +33,3 @@
+template bool isSetDifferenceEmpty(const S &S1, const S &S2) {
+ for (const auto &E : S1)
isSubset?
Comment at: clang-tidy/u
This revision was automatically updated to reflect the committed changes.
Closed by commit rL270714: Speed up check by using a recursive visitor.
(authored by sbenza).
Changed prior to commit:
http://reviews.llvm.org/D20597?vs=58438&id=58440#toc
Repository:
rL LLVM
http://reviews.llvm.org/D
Author: sbenza
Date: Wed May 25 11:19:23 2016
New Revision: 270714
URL: http://llvm.org/viewvc/llvm-project?rev=270714&view=rev
Log:
Speed up check by using a recursive visitor.
Summary:
Use a recursive visitor instead of forEachDescendant() matcher.
The latter requires several layers of virtual
sbenza updated this revision to Diff 58438.
sbenza marked an inline comment as done.
sbenza added a comment.
Reformat code
http://reviews.llvm.org/D20597
Files:
clang-tidy/readability/FunctionSizeCheck.cpp
clang-tidy/readability/FunctionSizeCheck.h
Index: clang-tidy/readability/FunctionSiz
sbenza created this revision.
sbenza added a reviewer: alexfh.
sbenza added a subscriber: cfe-commits.
Use a recursive visitor instead of forEachDescendant() matcher.
The latter requires several layers of virtual function calls for each node and
it is more expensive than the visitor.
Benchmark res
sbenza added inline comments.
Comment at: include/clang/AST/ASTContext.h:824
@@ -823,1 +823,3 @@
unsigned overridden_methods_size(const CXXMethodDecl *Method) const;
+ typedef llvm::iterator_range
+ overridden_method_range;
Sure. Sorry about that.
The mai
sbenza added inline comments.
Comment at: clang-tidy/performance/UnnecessaryValueParamCheck.cpp:83
@@ +82,3 @@
+ if (!IsConstQualified) {
+auto Matches = utils::decl_ref_expr::allDeclRefExprs(
+*Param, *Function->getBody(), *Result.Context);
We should
sbenza added inline comments.
Comment at: lib/ASTMatchers/Dynamic/Registry.cpp:78
@@ -77,2 +77,3 @@
// Need Variant/Parser fixes:
+ // hasCastKind
// ofKind
Is it registered or not?
You add this comment, but also add the matcher in the registry below.
h
sbenza added inline comments.
Comment at: lib/ASTMatchers/Dynamic/Marshallers.h:102
@@ +101,3 @@
+ static clang::CastKind getCastKind(llvm::StringRef AttrKind) {
+return llvm::StringSwitch(AttrKind)
+ .Case("CK_Dependent", CK_Dependent)
etienneb wrote:
>
Author: sbenza
Date: Wed May 4 15:45:00 2016
New Revision: 268548
URL: http://llvm.org/viewvc/llvm-project?rev=268548&view=rev
Log:
Fix the doc extraction script to work with hasAnyName and with equalsNode.
The change from llvm::VariadicFunction to internal::VariadicFunction
broke the extraction
This revision was automatically updated to reflect the committed changes.
Closed by commit rL268430: [clang-tidy] Speedup misc-static-assert. (authored
by sbenza).
Changed prior to commit:
http://reviews.llvm.org/D19877?vs=56028&id=56053#toc
Repository:
rL LLVM
http://reviews.llvm.org/D1987
Author: sbenza
Date: Tue May 3 15:11:09 2016
New Revision: 268430
URL: http://llvm.org/viewvc/llvm-project?rev=268430&view=rev
Log:
[clang-tidy] Speedup misc-static-assert.
Summary:
Speedup the misc-static-assert check by not use `stmt()` as the toplevel
matcher.
The framework runs a filter on
sbenza created this revision.
sbenza added a reviewer: alexfh.
sbenza added a subscriber: cfe-commits.
Speedup the misc-static-assert check by not use `stmt()` as the toplevel
matcher.
The framework runs a filter on the matchers before trying them on each node and
uses the toplevel type for this.
sbenza added a comment.
> > 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
sbenza added a comment.
In http://reviews.llvm.org/D19871#419985, @aaron.ballman wrote:
> In http://reviews.llvm.org/D19871#419954, @etienneb wrote:
>
> > In http://reviews.llvm.org/D19871#419947, @aaron.ballman wrote:
> >
> > > Is this required for some purpose?
> >
> >
> > It's used in clang-ti
sbenza accepted this revision.
Comment at: clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp:69
@@ +68,3 @@
+void UnconventionalAssignOperatorCheck::check(const MatchFinder::MatchResult
&Result) {
+ if (const auto *RetStmt = Result.Nodes.getNodeAs("returnStmt")) {
+diag(
sbenza added inline comments.
Comment at: include/clang/AST/DeclCXX.h:1830
@@ -1829,2 +1829,3 @@
unsigned size_overridden_methods() const;
+ const ArrayRef overridden_methods() const;
Return type should have have toplevel `const`.
Comment a
sbenza added inline comments.
Comment at: clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp:69
@@ +68,3 @@
+void UnconventionalAssignOperatorCheck::check(const MatchFinder::MatchResult
&Result) {
+ if (const auto *RetStmt = Result.Nodes.getNodeAs("returnStmt")) {
+diag(R
sbenza added inline comments.
Comment at: lib/AST/ASTContext.cpp:1279
@@ -1282,1 +1278,3 @@
+const ASTContext::CXXMethodVector *
+ASTContext::overridden_methods(const CXXMethodDecl *Method) const {
llvm::DenseMap::const_iterator Pos
It would be simpler to retur
sbenza added a comment.
Thanks for doing this!
I think we want the version that iterates all parents.
Otherwise it will have problems with templates.
That is, you won't know which `FunctionDecl` you will get: the template or the
instantiation. And you might need one or the other specifically.
sbenza added a comment.
> > 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.
It might help i
This revision was automatically updated to reflect the committed changes.
Closed by commit rL266748: [ASTMatchers] Do not try to memoize nodes we can't
compare. (authored by sbenza).
Changed prior to commit:
http://reviews.llvm.org/D19231?vs=54089&id=54207#toc
Repository:
rL LLVM
http://rev
Author: sbenza
Date: Tue Apr 19 10:52:56 2016
New Revision: 266748
URL: http://llvm.org/viewvc/llvm-project?rev=266748&view=rev
Log:
[ASTMatchers] Do not try to memoize nodes we can't compare.
Summary:
Prevent hasAncestor from comparing nodes that are not supported.
hasDescendant was fixed some t
sbenza added a comment.
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`.
http://reviews.llvm.org/D19144
___
sbenza created this revision.
sbenza added a reviewer: alexfh.
sbenza added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
Prevent hasAncestor from comparing nodes that are not supported.
hasDescendant was fixed some time ago to avoid this problem.
I'm applying the same fix to hasAn
sbenza added a comment.
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.
sbenza added a comment.
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 check
This revision was automatically updated to reflect the committed changes.
Closed by commit rL266369: [clang-tidy] Add check misc-multiple-statement-macro
(authored by sbenza).
Changed prior to commit:
http://reviews.llvm.org/D18766?vs=53398&id=53786#toc
Repository:
rL LLVM
http://reviews.ll
Author: sbenza
Date: Thu Apr 14 16:15:57 2016
New Revision: 266369
URL: http://llvm.org/viewvc/llvm-project?rev=266369&view=rev
Log:
[clang-tidy] Add check misc-multiple-statement-macro
Summary:
The check detects multi-statement macros that are used in unbraced conditionals.
Only the first statem
sbenza added inline comments.
Comment at: clang-tidy/misc/AssignOperatorCheck.cpp:63
@@ +62,3 @@
+
+ Finder->addMatcher(returnStmt(IsBadReturnStatement,
hasAncestor(IsGoodAssign))
+ .bind("returnStmt"),
baloghadamsoftware wrote:
> sbenza
sbenza added a comment.
Those tests are testing the code completion you get in clang-query.
The type list must match what that matcher supports.
`hasParent` is declared as
const internal::ArgumentAdaptingMatcherFunc<
internal::HasParentMatcher,
internal::TypeList,
internal::T
sbenza added inline comments.
Comment at: clang-tidy/misc/MultipleStatementMacroCheck.cpp:99
@@ +98,3 @@
+
+ diag(InnerRanges.back().first, "multiple statement macro spans unbraced "
+ "conditional and the following statement");
al
sbenza updated this revision to Diff 53398.
sbenza marked an inline comment as done.
sbenza added a comment.
Change warning message.
http://reviews.llvm.org/D18766
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/MultipleStatementMacroCheck.cpp
cl
sbenza added inline comments.
Comment at: clang-tidy/readability/RedundantInlineCheck.cpp:68
@@ +67,3 @@
+ }
+ llvm_unreachable("InlineTok() did not encounter the 'inline' token");
+}
This is still reachable.
The token might be hidden through macros, for example
sbenza added inline comments.
Comment at: clang-tidy/readability/RedundantInlineCheck.cpp:59
@@ +58,3 @@
+ while (!RawLexer.LexFromRawLexer(Tok)) {
+if (Tok.is(tok::semi) || Tok.is(tok::l_brace))
+ break;
Parsing C++ is hard.
Stopping at the first `{` me
sbenza added inline comments.
Comment at: clang-tidy/misc/AssignOperatorCheck.cpp:63
@@ +62,3 @@
+
+ Finder->addMatcher(returnStmt(IsBadReturnStatement,
hasAncestor(IsGoodAssign))
+ .bind("returnStmt"),
baloghadamsoftware wrote:
> sbenza
sbenza added inline comments.
Comment at: docs/clang-tidy/checks/misc-multiple-statement-macro.rst:15
@@ +14,3 @@
+ if (do_increment)
+INCREMENT_TWO(a, b);
+
hokein wrote:
> Would be better to add a comment to explain the sample.
The sentence just before the
sbenza updated this revision to Diff 52702.
sbenza marked 2 inline comments as done and an inline comment as not done.
sbenza added a comment.
Minor fixes
http://reviews.llvm.org/D18766
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/MultipleStatem
sbenza added inline comments.
Comment at: clang-tidy/misc/AssignOperatorCheck.cpp:63
@@ +62,3 @@
+
+ Finder->addMatcher(returnStmt(IsBadReturnStatement,
hasAncestor(IsGoodAssign))
+ .bind("returnStmt"),
baloghadamsoftware wrote:
> sbenza
sbenza marked an inline comment as done and an inline comment as not done.
Comment at: clang-tidy/misc/MultipleStatementMacroCheck.cpp:33
@@ +32,3 @@
+
+namespace {
+
etienneb wrote:
> I feel it nicer if you merge this namespace with the one at line 20.
I like to
sbenza updated this revision to Diff 52625.
sbenza marked an inline comment as done.
sbenza added a comment.
Minor fixes
http://reviews.llvm.org/D18766
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/MiscTidyModule.cpp
clang-tidy/misc/MultipleStatementMacroCheck.cpp
clang-tidy/mis
sbenza created this revision.
sbenza added a reviewer: alexfh.
sbenza added a subscriber: cfe-commits.
The check detects multi-statement macros that are used in unbraced conditionals.
Only the first statement will be part of the conditionals and the rest will fall
outside of it and executed uncond
sbenza added a comment.
In http://reviews.llvm.org/D18191#391168, @sdowney wrote:
> 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.
The only check we are doing (other than mat
sbenza added a comment.
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)
One big difference is that we decided to not trigger on typedefs.
We can't know that the typedef is documented
sbenza added inline comments.
Comment at: clang-tidy/misc/AssignOperatorCheck.cpp:63
@@ +62,3 @@
+
+ Finder->addMatcher(returnStmt(IsBadReturnStatement,
hasAncestor(IsGoodAssign))
+ .bind("returnStmt"),
I dislike these uses of hasAnscesto
to the function pointer template
>> parameter.
>> gcc doesn't want to do the implicit conversion from X to A, but if I make
>> the conversion explicit it works.
>>
>>
>> On Fri, Mar 25, 2016 at 1:58 PM, Alexey Samsonov
>> wrote:
>>
>>>
t;>
>> On Fri, Mar 25, 2016 at 10:46 AM, Samuel Benzaquen via cfe-commits <
>> cfe-commits@lists.llvm.org> wrote:
>>
>>> Author: sbenza
>>> Date: Fri Mar 25 12:46:02 2016
>>> New Revision: 264428
>>>
>>> URL: http://llvm.org/view
This is already being done in http://reviews.llvm.org/D18582
On Wed, Mar 30, 2016 at 12:44 PM, Richard wrote:
> LegalizeAdulthood added a subscriber: LegalizeAdulthood.
> LegalizeAdulthood added a comment.
>
> Can you add a synopsis of this new check to `docs/ReleaseNotes.rst` please?
>
>
> Repo
This revision was automatically updated to reflect the committed changes.
Closed by commit rL264759: [clang-tidy] Add check to detect dangling references
in value handlers. (authored by sbenza).
Changed prior to commit:
http://reviews.llvm.org/D17811?vs=51684&id=51956#toc
Repository:
rL LLVM
Author: sbenza
Date: Tue Mar 29 13:02:26 2016
New Revision: 264759
URL: http://llvm.org/viewvc/llvm-project?rev=264759&view=rev
Log:
[clang-tidy] Add check to detect dangling references in value handlers.
Summary:
Add check misc-dangling-handle to detect dangling references in value
handlers like
sbenza added a comment.
In http://reviews.llvm.org/D18475#385789, @alexfh wrote:
> 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.
There are two things I've done before that might apply
On Fri, Mar 25, 2016 at 7:01 PM, Richard Smith
wrote:
> On Fri, Mar 25, 2016 at 10:55 AM, David Blaikie via cfe-commits
> wrote:
> >
> >
> > On Fri, Mar 25, 2016 at 10:46 AM, Samuel Benzaquen via cfe-commits
> > wrote:
> >>
> >> Author: sbe
sbenza updated this revision to Diff 51684.
sbenza added a comment.
Using new public hasAnyName API.
http://reviews.llvm.org/D17811
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/DanglingHandleCheck.cpp
clang-tidy/misc/DanglingHandleCheck.h
clang-tidy/misc/MiscTidyModule.cpp
do
25, 2016 at 2:18 PM, Mehdi Amini
>> wrote:
>>
>>> Hi,
>>>
>>> I think this broke clang-tidy somehow:
>>> http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/10881/steps/build%20stage%201/logs/stdio
>>>
>>> --
>>> M
Author: sbenza
Date: Fri Mar 25 14:41:32 2016
New Revision: 264453
URL: http://llvm.org/viewvc/llvm-project?rev=264453&view=rev
Log:
[ASTMatchers] Don't use brace-init lists.
They are not supported everywhere yet.
This fixes the MSVC build.
Modified:
cfe/trunk/include/clang/ASTMatchers/ASTMa
builds/10881/steps/build%20stage%201/logs/stdio
>>
>> --
>> Mehdi
>>
>>
>>
>>
>> > On Mar 25, 2016, at 9:29 AM, Samuel Benzaquen via cfe-commits <
>> cfe-commits@lists.llvm.org> wrote:
>> >
>> > Author: sbenza
>> > Date:
>
> > On Mar 25, 2016, at 9:29 AM, Samuel Benzaquen via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
> >
> > Author: sbenza
> > Date: Fri Mar 25 11:29:30 2016
> > New Revision: 264417
> >
> > URL: http://llvm.org/viewvc/llvm-projec
On Fri, Mar 25, 2016 at 1:55 PM, Etienne Bergeron
wrote:
> etienneb added a subscriber: etienneb.
> etienneb added a comment.
>
> Any plan for doing the same for : hasOverloadedOperatorName ?
>
hasAnyName() was added mostly for performance reasons.
We could add the 'Any' version of hasOverloaded
Author: sbenza
Date: Fri Mar 25 12:46:02 2016
New Revision: 264428
URL: http://llvm.org/viewvc/llvm-project?rev=264428&view=rev
Log:
[ASTMatchers] Fix build for VariadicFunction.
Under some conditions the implicit conversion from array to ArrayRef<>
is not working.
Fix the build by making it expl
This revision was automatically updated to reflect the committed changes.
Closed by commit rL264417: [ASTMatchers] Add own version of VariadicFunction.
(authored by sbenza).
Changed prior to commit:
http://reviews.llvm.org/D18275?vs=51447&id=51645#toc
Repository:
rL LLVM
http://reviews.llvm
Author: sbenza
Date: Fri Mar 25 11:29:30 2016
New Revision: 264417
URL: http://llvm.org/viewvc/llvm-project?rev=264417&view=rev
Log:
[ASTMatchers] Add own version of VariadicFunction.
Summary:
llvm::VariadicFunction is only being used by ASTMatchers.
Having our own copy here allows us to remove t
sbenza added inline comments.
Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:80
@@ +79,3 @@
+ ResultT operator()(ArrayRef Args) const {
+std::vector InnerArgs;
+for (const ArgT &Arg : Args)
alexfh wrote:
> It's unfortunate that we need to cre
sbenza updated this revision to Diff 51447.
sbenza added a comment.
Minor fix
http://reviews.llvm.org/D18275
Files:
include/clang/ASTMatchers/ASTMatchers.h
include/clang/ASTMatchers/ASTMatchersInternal.h
lib/ASTMatchers/Dynamic/Marshallers.h
unittests/ASTMatchers/ASTMatchersTest.cpp
In
sbenza added a comment.
In http://reviews.llvm.org/D17811#380124, @jbcoe wrote:
> Do you have commit access? I can apply this patch for you if not.
I do.
I am waiting on http://reviews.llvm.org/D18275 to fix the problem with using
internal::HasNameMatcher directly.
http://reviews.llvm.org/D1
sbenza added a comment.
In http://reviews.llvm.org/D17986#379271, @baloghadamsoftware wrote:
> 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. W
Author: sbenza
Date: Mon Mar 21 13:00:43 2016
New Revision: 263963
URL: http://llvm.org/viewvc/llvm-project?rev=263963&view=rev
Log:
[clang-tidy] Fix check broken in rL263822.
Add names missing from rL263822 and add tests to prevent future omissions.
Modified:
clang-tools-extra/trunk/clang-t
sbenza added a comment.
Can you rerun the doc script (dump_ast_matchers.py)?
http://reviews.llvm.org/D17986
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: sbenza
Date: Fri Mar 18 15:14:35 2016
New Revision: 263822
URL: http://llvm.org/viewvc/llvm-project?rev=263822&view=rev
Log:
[clang-tidy] Use hasAnyName() instead of matchesName().
matchesName() uses regular expressions and it is very slow.
hasAnyName() gives the same result and it is muc
sbenza added a comment.
Please add a test for this.
http://reviews.llvm.org/D18243
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
sbenza added inline comments.
Comment at: include/clang/ASTMatchers/ASTMatchers.h:4848
@@ +4847,3 @@
+/// \code
+/// return a+b;
+/// \endcode
`a + b` (with spaces)
A few in this comment, and one in the test.
Comment at: include/clang/ASTMatche
sbenza added a comment.
Alex, this is what we discussed to make `hasAnyName` take a `vector`
directly.
http://reviews.llvm.org/D18275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
sbenza created this revision.
sbenza added a reviewer: alexfh.
sbenza added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
llvm::VariadicFunction is only being used by ASTMatchers.
Having own copy here allows us to remove the other one from llvm/ADT.
Also, we can extend the API to o
sbenza added a comment.
> 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
sbenza added a comment.
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.
Comment at: include/clang/ASTMatchers/ASTMatchers.h:4796
@@ +4795,3 @@
sbenza updated this revision to Diff 49998.
sbenza marked 3 inline comments as done.
sbenza added a comment.
Minor fixes
http://reviews.llvm.org/D17811
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/DanglingHandleCheck.cpp
clang-tidy/misc/DanglingHandleCheck.h
clang-tidy/misc/Mis
sbenza added inline comments.
Comment at: clang-tidy/misc/DanglingHandleCheck.cpp:24
@@ +23,3 @@
+
+std::vector parseClasses(StringRef Option) {
+ SmallVector Classes;
alexfh wrote:
> A very similar code has been added recently to
> clang-tidy/utils/HeaderFileEx
sbenza added a comment.
In http://reviews.llvm.org/D17811#366482, @Eugene.Zelenko wrote:
> Does it make http://reviews.llvm.org/D17772 obsolete?
Yes. The other patch has already been abandoned.
http://reviews.llvm.org/D17811
___
cfe-commits maili
sbenza created this revision.
sbenza added a reviewer: alexfh.
sbenza added a subscriber: cfe-commits.
Add check misc-dangling-handle to detect dangling references in value
handlers like std::experimental::string_view.
It provides a configuration option to specify other handle types that
should al
sbenza added a comment.
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?
http://reviews.llvm.org/D17575
___
cfe-commits mailing list
cfe-commits@lists
On Mon, Feb 22, 2016 at 5:27 PM, Hans Wennborg wrote:
> On Mon, Feb 22, 2016 at 1:13 PM, Samuel Benzaquen via cfe-commits
> wrote:
> > Author: sbenza
> > Date: Mon Feb 22 15:13:02 2016
> > New Revision: 261574
> >
> > URL: http://llvm.org/viewvc/llvm
On Mon, Feb 22, 2016 at 4:44 PM, Aaron Ballman
wrote:
> On Mon, Feb 22, 2016 at 4:43 PM, Samuel Benzaquen
> wrote:
> >
> > On Mon, Feb 22, 2016 at 4:19 PM, Aaron Ballman
> > wrote:
> >>
> >> On Mon, Feb 22, 2016 at 4:13 PM, Samuel Benzaquen via cfe-
1 - 100 of 176 matches
Mail list logo