Re: [PATCH] D18914: [clang-tidy] new readability-redundant-inline

2016-05-10 Thread Matthias Gehre via cfe-commits
mgehre updated this revision to Diff 56800. mgehre added a comment. Update for review comment: - Return Optional when looking for 'inline' - Add test that hides 'inline' in a macro http://reviews.llvm.org/D18914 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/Readabilit

Re: [PATCH] D18914: [clang-tidy] new readability-redundant-inline

2016-04-12 Thread Samuel Benzaquen via cfe-commits
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

Re: [PATCH] D18914: [clang-tidy] new readability-redundant-inline

2016-04-11 Thread Matthias Gehre via cfe-commits
mgehre added inline comments. Comment at: test/clang-tidy/readability-redundant-inline.cpp:6 @@ +5,3 @@ +// CHECK-MESSAGES: :[[@LINE-1]]:14: warning: 'inline' is redundant because method body is defined inside class [readability-redundant-inline] +// CHECK-FIXES: {{^}} int f1()

Re: [PATCH] D18914: [clang-tidy] new readability-redundant-inline

2016-04-11 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: test/clang-tidy/readability-redundant-inline.cpp:5 @@ +4,3 @@ + inline int f1() { +// CHECK-MESSAGES: :[[@LINE-1]]:14: warning: 'inline' is redundant because method body is defined inside class [readability-redundant-inline] +// CHE

Re: [PATCH] D18914: [clang-tidy] new readability-redundant-inline

2016-04-11 Thread Matthias Gehre via cfe-commits
mgehre updated this revision to Diff 53317. mgehre added a comment. Removed debug output http://reviews.llvm.org/D18914 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/readability/RedundantInlineCheck.cpp clang-tidy/readability/Re

Re: [PATCH] D18914: [clang-tidy] new readability-redundant-inline

2016-04-11 Thread Matthias Gehre via cfe-commits
mgehre updated this revision to Diff 53315. mgehre added a comment. Update for review comments; simplified lexing, added proposed test case http://reviews.llvm.org/D18914 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/readability/R

Re: [PATCH] D18914: [clang-tidy] new readability-redundant-inline

2016-04-11 Thread Samuel Benzaquen via cfe-commits
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

Re: [PATCH] D18914: [clang-tidy] new readability-redundant-inline

2016-04-09 Thread Matthias Gehre via cfe-commits
mgehre added a comment. I'm thinking about extending the check to the following issue and would like to hear your opinion. In C++, the following three code snippets all have identical meaning 1: struct S { int f(); }; inline int S::f() { return 0; } 2: struct S { inline

Re: [PATCH] D18914: [clang-tidy] new readability-redundant-inline

2016-04-09 Thread Matthias Gehre via cfe-commits
mgehre updated this revision to Diff 53118. mgehre added a comment. Update for review comments http://reviews.llvm.org/D18914 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/readability/RedundantInlineCheck.cpp clang-tidy/readabil

Re: [PATCH] D18914: [clang-tidy] new readability-redundant-inline

2016-04-08 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/readability-redundant-inline.rst:6 @@ +5,3 @@ + +This check flags redundant 'inline' specifiers. +It flags 'inline' on member functions defined inside a class definition like Please use `` fo

Re: [PATCH] D18914: [clang-tidy] new readability-redundant-inline

2016-04-08 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). http://reviews.llvm.org/D18914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt