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
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
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()
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
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
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
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
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
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
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
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
11 matches
Mail list logo