aaron.ballman accepted this revision.
aaron.ballman added a comment.
LGTM!
https://reviews.llvm.org/D37060
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
JonasToth updated this revision to Diff 113269.
JonasToth marked an inline comment as done.
JonasToth added a comment.
- adjusted expected diagnostics
- adjust diagnostics and remove private inheritance cases
https://reviews.llvm.org/D37060
Files:
clang-tidy/hicpp/ExceptionBaseclassCheck.cpp
aaron.ballman added subscribers: sbenza, klimek.
aaron.ballman added inline comments.
Comment at: test/clang-tidy/hicpp-exception-baseclass.cpp:9
+class deep_hierarchy : public derived_exception {};
class non_derived_exception {};
JonasToth wrote:
>
JonasToth marked 5 inline comments as done.
JonasToth added inline comments.
Comment at: test/clang-tidy/hicpp-exception-baseclass.cpp:9
+class deep_hierarchy : public derived_exception {};
class non_derived_exception {};
aaron.ballman wrote:
> JonasToth
aaron.ballman added inline comments.
Comment at: test/clang-tidy/hicpp-exception-baseclass.cpp:9
+class deep_hierarchy : public derived_exception {};
class non_derived_exception {};
JonasToth wrote:
> aaron.ballman wrote:
> > JonasToth wrote:
> > >
JonasToth marked 3 inline comments as done.
JonasToth added inline comments.
Comment at: test/clang-tidy/hicpp-exception-baseclass.cpp:9
+class deep_hierarchy : public derived_exception {};
class non_derived_exception {};
aaron.ballman wrote:
> JonasToth
aaron.ballman added inline comments.
Comment at: clang-tidy/hicpp/ExceptionBaseclassCheck.cpp:41
+ "'std::exception'")
+ << BadThrow->getSubExpr()->getType() << BadThrow->getSourceRange();
JonasToth wrote:
>
JonasToth updated this revision to Diff 113252.
JonasToth added a comment.
- added inheritance cases, adjusted matcher is required
https://reviews.llvm.org/D37060
Files:
clang-tidy/hicpp/ExceptionBaseclassCheck.cpp
test/clang-tidy/hicpp-exception-baseclass.cpp
Index:
JonasToth marked 3 inline comments as done.
JonasToth added inline comments.
Comment at: clang-tidy/hicpp/ExceptionBaseclassCheck.cpp:41
+ "'std::exception'")
+ << BadThrow->getSubExpr()->getType() << BadThrow->getSourceRange();
aaron.ballman added inline comments.
Comment at: clang-tidy/hicpp/ExceptionBaseclassCheck.cpp:41
+ "'std::exception'")
+ << BadThrow->getSubExpr()->getType() << BadThrow->getSourceRange();
Can you add a test
JonasToth added a comment.
@aaron.ballman is it ok for you as well? otherwise i would commit it.
https://reviews.llvm.org/D37060
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
JonasToth added inline comments.
Comment at: test/clang-tidy/hicpp-exception-baseclass.cpp:54-62
+// CHECK-MESSAGES: [[@LINE-1]]:31: warning: throwing an exception whose type
'bad_generic_exception' is not derived from 'std::exception'
+// CHECK-MESSAGES: 71:1: note: type
lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.
Thank you for working on this!
I just tried, and the original false-positive i was hitting is now gone.
So as far i'm concerned, this is good to go.
Comment at:
JonasToth updated this revision to Diff 113214.
JonasToth added a comment.
struggling with arc...
https://reviews.llvm.org/D37060
Files:
clang-tidy/hicpp/ExceptionBaseclassCheck.cpp
test/clang-tidy/hicpp-exception-baseclass.cpp
Index: test/clang-tidy/hicpp-exception-baseclass.cpp
JonasToth updated this revision to Diff 113213.
JonasToth added a comment.
fix patch, to diff against master again
https://reviews.llvm.org/D37060
Files:
clang-tidy/hicpp/ExceptionBaseclassCheck.cpp
test/clang-tidy/hicpp-exception-baseclass.cpp
Index:
JonasToth updated this revision to Diff 113212.
JonasToth marked 2 inline comments as done.
JonasToth added a comment.
- removing trailing comments
https://reviews.llvm.org/D37060
Files:
test/clang-tidy/hicpp-exception-baseclass.cpp
Index: test/clang-tidy/hicpp-exception-baseclass.cpp
JonasToth added inline comments.
Comment at: test/clang-tidy/hicpp-exception-baseclass.cpp:26
}
throw non_derived_exception(); // Bad
+ // CHECK-MESSAGES: [[@LINE-1]]:9: warning: throwing an exception whose type
'non_derived_exception' is not derived from
lebedev.ri added a comment.
I did not test this yet, but looks better :)
Comment at: test/clang-tidy/hicpp-exception-baseclass.cpp:26
}
throw non_derived_exception(); // Bad
+ // CHECK-MESSAGES: [[@LINE-1]]:9: warning: throwing an exception whose type
18 matches
Mail list logo