Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-03-03 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. The comments should be addressed in: http://reviews.llvm.org/rL262615 Repository: rL LLVM http://reviews.llvm.org/D16535 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-26 Thread Richard via cfe-commits
LegalizeAdulthood added a subscriber: LegalizeAdulthood. Comment at: docs/clang-tidy/checks/misc-suspicious-semicolon.rst:48-49 @@ +47,4 @@ + +while(readWhitespace()); + Token t = readNextToken(); + In this documentation, can we please format code so that

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-26 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D16535#362761, @xazax.hun wrote: > In http://reviews.llvm.org/D16535#362726, @alexfh wrote: > > > I think, the check can be submitted as is and guards against spurious > > errors on invalid AST can be added as a follow up. > > > This check is al

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-26 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. In http://reviews.llvm.org/D16535#362726, @alexfh wrote: > I think, the check can be submitted as is and guards against spurious errors > on invalid AST can be added as a follow up. This check is already submitted. However I did not found any API in tidy to check wh

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-26 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. I think, the check can be submitted as is and guards against spurious errors on invalid AST can be added as a follow up. Repository: rL LLVM http://reviews.llvm.org/D16535 ___ cfe-commits mailing list cfe-commits@lists.ll

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-26 Thread Kirill Bobyrev via cfe-commits
omtcyf0 added a comment. Hm. Seems like this **is** either me using `run-clang-tidy.py` wrong or it working not properly, because I still get compilation errors. I believe I've done the same thing yesterday using the older tree and I didn't get any. Thus said, everything's alright if the AST is

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-26 Thread Kirill Bobyrev via cfe-commits
omtcyf0 added a comment. In http://reviews.llvm.org/D16535#362689, @alexfh wrote: > In http://reviews.llvm.org/D16535#362685, @omtcyf0 wrote: > > > @xazax.hun did you actually run the tool on the LLVM codebase? > > > > Because this check generates **tons** of false-positive reports during > > co

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-26 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Having said that, it makes sense to handle invalid AST in the check somehow (e.g. completely disable the check), so it doesn't generate spurious errors. Repository: rL LLVM http://reviews.llvm.org/D16535 ___ cfe-commits m

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-26 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D16535#362685, @omtcyf0 wrote: > @xazax.hun did you actually run the tool on the LLVM codebase? > > Because this check generates **tons** of false-positive reports during > codebase analysis. > > See the minimal example below. > > omtcyf0-lapt

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-26 Thread Kirill Bobyrev via cfe-commits
omtcyf0 added a subscriber: omtcyf0. omtcyf0 added a comment. @xazax.hun did you actually run the tool on the LLVM codebase? Because this check generates **tons** of false-positive reports during codebase analysis. See the minimal example below. omtcyf0-laptop:playground omtcyf0$ cat main.cp

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-11 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. In http://reviews.llvm.org/D16535#348469, @alexfh wrote: > Could you run the check on LLVM and post here a summary of results: how many > warnings are generated, whether there are any false positives (based on a > reasonably-sized random sample, if there are too many

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-11 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL260503: [clang-tidy] Add a check to find unintended semicolons that changes the… (authored by xazax). Changed prior to commit: http://reviews.llvm.org/D16535?vs=47446&id=47604#toc Repository: rL LLVM

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-10 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG. Thanks! Could you run the check on LLVM and post here a summary of results: how many warnings are generated, whether there are any false positives (based on a reasonably-sized random sample, if there are too many warnings to inspect all

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-10 Thread Haojian Wu via cfe-commits
hokein added a comment. LGTM, thanks for working on this! Ping @alexfh http://reviews.llvm.org/D16535 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-10 Thread Gábor Horváth via cfe-commits
xazax.hun updated this revision to Diff 47446. xazax.hun added a comment. - Documentation clarification. http://reviews.llvm.org/D16535 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SuspiciousSemicolonCheck.cpp clang-tidy/misc/SuspiciousSemicol

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-10 Thread Gábor Horváth via cfe-commits
xazax.hun added inline comments. Comment at: docs/clang-tidy/checks/misc-suspicious-semicolon.rst:35 @@ +34,3 @@ + +if(x >= y); +x -= y; hokein wrote: > The doc needs to be updated. > > With your latest patch, this is also a warning case. The documentatio

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-09 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: docs/clang-tidy/checks/misc-suspicious-semicolon.rst:35 @@ +34,3 @@ + +if(x >= y); +x -= y; The doc needs to be updated. With your latest patch, this is also a warning case. http://reviews.llvm.org/D16535 ___

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-09 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. Thank you, good catches! http://reviews.llvm.org/D16535 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-09 Thread Gábor Horváth via cfe-commits
xazax.hun updated this revision to Diff 47316. xazax.hun added a comment. - Fixed the cases pointed out by the review. http://reviews.llvm.org/D16535 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SuspiciousSemicolonCheck.cpp clang-tidy/misc/Sus

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-09 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/misc/SuspiciousSemicolonCheck.cpp:23 @@ +22,3 @@ + Finder->addMatcher( + stmt(anyOf(ifStmt(hasThen(nullStmt().bind("semi"))), + forStmt(hasBody(nullStmt().bind("semi"))), Looks like this ch

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-02-08 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Sorry for the long delay. Currently rather swamped. Haojian, could you take a look at this patch? http://reviews.llvm.org/D16535 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-01-26 Thread Gábor Horváth via cfe-commits
xazax.hun updated this revision to Diff 45949. xazax.hun added a comment. - Fixed the nits pointed out by the review. http://reviews.llvm.org/D16535 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SuspiciousSemicolonCheck.cpp clang-tidy/misc/Susp

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-01-26 Thread Gábor Horváth via cfe-commits
xazax.hun marked 5 inline comments as done. xazax.hun added a comment. http://reviews.llvm.org/D16535 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-01-25 Thread Kim Gräsman via cfe-commits
kimgr added a subscriber: kimgr. kimgr added a comment. Cool check, I like how it pays attention to indentation! I found some minor doc nits, see inline. Comment at: docs/clang-tidy/checks/misc-suspicious-semicolon.rst:8-9 @@ +7,4 @@ +the code. More specifically, it looks for `

[PATCH] D16535: [clang-tidy] Check to find unintended semicolons that changes the semantics.

2016-01-25 Thread Gábor Horváth via cfe-commits
xazax.hun created this revision. xazax.hun added a reviewer: alexfh. xazax.hun added subscribers: dkrupp, cfe-commits. This patch adds a checker to find semicolons that are probably unintended and modify the semantics of the program. See the examples and the documentation for more details. http