Re: [PATCH] D18264: [clang-tidy] misc-assign-operator-signature checker checks return value of all assign operators

2016-03-21 Thread Etienne Bergeron via cfe-commits
etienneb added a subscriber: etienneb. Comment at: clang-tidy/misc/AssignOperatorSignatureCheck.cpp:39 @@ -37,1 +38,3 @@ + const auto IsSelfAssign = +cxxMethodDecl(IsAssign, hasParameter(0, parmVarDecl(hasType(IsSelf nit: could you +2

Re: [PATCH] D18293: [clang-tidy] Fix redundant-string-init check with msvc 14 headers.

2016-03-22 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 51298. etienneb added a comment. Rebased + fixing invalid paths. The diff paths were wrong, invalid diff. http://reviews.llvm.org/D18293 Files: clang-tidy/readability/RedundantStringInitCheck.cpp test/clang-tidy/readability-redundant-string-init-msvc.

[clang-tools-extra] r264069 - [clang-tidy] Fix redundant-string-init check with msvc 14 headers.

2016-03-22 Thread Etienne Bergeron via cfe-commits
Author: etienneb Date: Tue Mar 22 12:39:36 2016 New Revision: 264069 URL: http://llvm.org/viewvc/llvm-project?rev=264069&view=rev Log: [clang-tidy] Fix redundant-string-init check with msvc 14 headers. Summary: The string constructors are not defined using optional parameters and are not recogni

Re: [PATCH] D18262: [clang-tidy] Skip reporting of not applicable fixes.

2016-03-22 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 51305. etienneb added a comment. rebase + fixing invalid paths http://reviews.llvm.org/D18262 Files: clang-tidy/ClangTidy.cpp test/clang-tidy/misc-macro-parentheses-cmdline.cpp Index: test/clang-tidy/misc-macro-parentheses-cmdline.cpp

[clang-tools-extra] r264073 - [clang-tidy] Skip reporting of not applicable fixes.

2016-03-22 Thread Etienne Bergeron via cfe-commits
Author: etienneb Date: Tue Mar 22 12:51:27 2016 New Revision: 264073 URL: http://llvm.org/viewvc/llvm-project?rev=264073&view=rev Log: [clang-tidy] Skip reporting of not applicable fixes. Summary: Invalid source location are causing clang-tidy to crash when manipulating an invalid file. Macro d

[clang-tools-extra] r264075 - [clang-tidy] Fix redundant-string-cstr check with msvc 14 headers.

2016-03-22 Thread Etienne Bergeron via cfe-commits
Author: etienneb Date: Tue Mar 22 13:00:13 2016 New Revision: 264075 URL: http://llvm.org/viewvc/llvm-project?rev=264075&view=rev Log: [clang-tidy] Fix redundant-string-cstr check with msvc 14 headers. Summary: The string constructors are not defined using optional parameters and are not recogni

[PATCH] D18365: [clang-tidy] Fix broken test with redundant string init (msvc).

2016-03-22 Thread Etienne Bergeron via cfe-commits
etienneb created this revision. etienneb added reviewers: rnk, alexfh. etienneb added a subscriber: cfe-commits. There is a silly bug that got introduced after fixing incorrect paths with this patch: http://reviews.llvm.org/D18293 The tests was present twice in the file. http://reviews.llvm.org

[clang-tools-extra] r264080 - [clang-tidy] Fix broken test with redundant string init (msvc).

2016-03-22 Thread Etienne Bergeron via cfe-commits
Author: etienneb Date: Tue Mar 22 13:21:17 2016 New Revision: 264080 URL: http://llvm.org/viewvc/llvm-project?rev=264080&view=rev Log: [clang-tidy] Fix broken test with redundant string init (msvc). Summary: There is a silly bug that got introduced after fixing incorrect paths with this patch: h

[PATCH] D18412: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

2016-03-23 Thread Etienne Bergeron via cfe-commits
etienneb created this revision. etienneb added a reviewer: alexfh. etienneb added a subscriber: cfe-commits. The current checker is able to recognize std::string but do not recognize other string variants. This path is adding the support for any string define with basic_string without consiring

Re: [PATCH] D18412: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

2016-03-23 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 51464. etienneb marked an inline comment as done. etienneb added a comment. Fix unittests. http://reviews.llvm.org/D18412 Files: clang-tidy/readability/RedundantStringCStrCheck.cpp test/clang-tidy/readability-redundant-string-cstr.cpp Index: test/clan

Re: [PATCH] D18412: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

2016-03-23 Thread Etienne Bergeron via cfe-commits
etienneb added a comment. In http://reviews.llvm.org/D18412#381843, @dblaikie wrote: > can you just match on the name of the template instead? I'm not sure to get your point? Are you proposing to match "basic_string" instead of the whole regexp? I'm in favor of that change as I don't see any c

Re: [PATCH] D17981: [clang-tidy] Fix clang-tidy to support parsing of assembly statements.

2016-03-23 Thread Etienne Bergeron via cfe-commits
etienneb added a comment. In http://reviews.llvm.org/D17981#380350, @alexfh wrote: > Adding Manuel, who might have better ideas. > > In http://reviews.llvm.org/D17981#374904, @rnk wrote: > > > In http://reviews.llvm.org/D17981#374553, @etienneb wrote: > > > > > This is a huge difference. I didn't

Re: [PATCH] D17981: [clang-tidy] Fix clang-tidy to support parsing of assembly statements.

2016-03-24 Thread Etienne Bergeron via cfe-commits
etienneb added a comment. In http://reviews.llvm.org/D17981#382478, @alexfh wrote: > ... and who is unavailable for the next couple of weeks, unfortunately. To > unblock you, I'd suggest the following solution for now: > > 1. move this code to clang/lib/Tooling > 2. gate the code and its depende

Re: [PATCH] D18412: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

2016-03-24 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 51558. etienneb added a comment. Change name/decl matchers to 'basic_string'. http://reviews.llvm.org/D18412 Files: clang-tidy/readability/RedundantStringCStrCheck.cpp test/clang-tidy/readability-redundant-string-cstr.cpp Index: test/clang-tidy/readab

Re: [PATCH] D18412: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

2016-03-24 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 51559. etienneb added a comment. remove dead-code http://reviews.llvm.org/D18412 Files: clang-tidy/readability/RedundantStringCStrCheck.cpp test/clang-tidy/readability-redundant-string-cstr.cpp Index: test/clang-tidy/readability-redundant-string-cstr.

[PATCH] D18454: Fix a missing comma between two string literals.

2016-03-24 Thread Etienne Bergeron via cfe-commits
etienneb created this revision. etienneb added reviewers: alexfh, rnk. etienneb added a subscriber: cfe-commits. The two literals are currently appended. I'm not sure what was broken by this. Please double check carefully. Silly bug found by an on-going checker for clang-tidy. http://reviews.ll

r264315 - Fix a missing comma between two string literals.

2016-03-24 Thread Etienne Bergeron via cfe-commits
Author: etienneb Date: Thu Mar 24 13:29:24 2016 New Revision: 264315 URL: http://llvm.org/viewvc/llvm-project?rev=264315&view=rev Log: Fix a missing comma between two string literals. Summary: The two literals are currently appended. I'm not sure what was broken by this. Please double check care

[PATCH] D18457: [clang-tidy] Add a new checker to detect missing comma in initializer list.

2016-03-24 Thread Etienne Bergeron via cfe-commits
etienneb created this revision. etienneb added a reviewer: alexfh. etienneb added a subscriber: cfe-commits. This checker is able to detect missing comma in an array of string literals. ``` const char* A[] = { "abc", "def" // missing comma (no compiler warnings) "ghi", }; ```

Re: [PATCH] D18457: [clang-tidy] Add a new checker to detect missing comma in initializer list.

2016-03-24 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 51584. etienneb added a comment. update comment. http://reviews.llvm.org/D18457 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SuspiciousMissingCommaCheck.cpp clang-tidy/misc/SuspiciousMissingCommaCheck.h

Re: [PATCH] D18412: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

2016-03-24 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 51585. etienneb added a comment. fix hasName. http://reviews.llvm.org/D18412 Files: clang-tidy/readability/RedundantStringCStrCheck.cpp test/clang-tidy/readability-redundant-string-cstr.cpp Index: test/clang-tidy/readability-redundant-string-cstr.cpp

Re: [PATCH] D18412: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

2016-03-24 Thread Etienne Bergeron via cfe-commits
etienneb marked an inline comment as done. etienneb added a comment. Tests are fine. PTAnL? Comment at: clang-tidy/readability/RedundantStringCStrCheck.cpp:103 @@ +102,3 @@ +callee(memberExpr().bind("member")), +callee(cxxMethodDec

[clang-tools-extra] r264325 - [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker.

2016-03-24 Thread Etienne Bergeron via cfe-commits
Author: etienneb Date: Thu Mar 24 14:42:36 2016 New Revision: 264325 URL: http://llvm.org/viewvc/llvm-project?rev=264325&view=rev Log: [clang-tidy] Add support for different char-types for the readability-redundant-string-cstr checker. Summary: The current checker is able to recognize std::strin

[PATCH] D18475: [clang-tidy] Add more detection rules for redundant c_str calls.

2016-03-25 Thread Etienne Bergeron via cfe-commits
etienneb created this revision. etienneb added a subscriber: cfe-commits. The string class contains methods which support receiving either a string literal or a string object. For example, calls to append can receive either a char* or a string. ``` string& append (const string& str); string&

Re: [PATCH] D18475: [clang-tidy] Add more detection rules for redundant c_str calls.

2016-03-25 Thread Etienne Bergeron via cfe-commits
etienneb added a comment. In http://reviews.llvm.org/D18475#383520, @Eugene.Zelenko wrote: > Thank you for enhancement! > > I think will be good idea to extend check for any function call that receives > .c_str(), since it mat be in other classes could have methods which receives > both C++ or

Re: [PATCH] D18475: [clang-tidy] Add more detection rules for redundant c_str calls.

2016-03-25 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 51657. etienneb added a comment. Fixing some matchers to use the recent new AstMatcher. (see http://reviews.llvm.org/D18275) http://reviews.llvm.org/D18475 Files: clang-tidy/readability/RedundantStringCStrCheck.cpp test/clang-tidy/readability-redundant

Re: [PATCH] D18475: [clang-tidy] Add more detection rules for redundant c_str calls.

2016-03-25 Thread Etienne Bergeron via cfe-commits
etienneb added a comment. chapuni@: I would like to know why "-target x86_64-unknown -std=c++11" was needed. I'm fixing an issue with char16_t/char32_t. Is that the problem you just fixed? http://reviews.llvm.org/D18475 ___ cfe-commits mailing lis

Re: [PATCH] D18275: [ASTMatchers] Add own version of VariadicFunction.

2016-03-25 Thread Etienne Bergeron via cfe-commits
etienneb added a subscriber: etienneb. etienneb added a comment. Any plan for doing the same for : hasOverloadedOperatorName ? Repository: rL LLVM http://reviews.llvm.org/D18275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

Re: [PATCH] D18275: [ASTMatchers] Add own version of VariadicFunction.

2016-03-25 Thread Etienne Bergeron via cfe-commits
> hasAnyName() was added mostly for performance reasons. Fair enough. Thanks. On Fri, Mar 25, 2016 at 2:01 PM, Samuel Benzaquen wrote: > 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

Re: [PATCH] D18475: [clang-tidy] Add more detection rules for redundant c_str calls.

2016-03-25 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 51664. etienneb updated the summary for this revision. etienneb added a comment. fix unittest on linux/32-bits. tested on windows/32-bits. http://reviews.llvm.org/D18475 Files: clang-tidy/readability/RedundantStringCStrCheck.cpp test/clang-tidy/readabi

<    1   2   3   4