aaron.ballman added inline comments.
Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54
+ } else if (const auto *const Call =
+ Result.Nodes.getNodeAs("ptr_fun_call")) {
+diag(Call->getLocStart(), Message) << "'std::ptr_fun'";
+ } else if
alexfh added inline comments.
Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54
+ } else if (const auto *const Call =
+ Result.Nodes.getNodeAs("ptr_fun_call")) {
+diag(Call->getLocStart(), Message) << "'std::ptr_fun'";
+ } else if (const
aaron.ballman added inline comments.
Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54
+ } else if (const auto *const Call =
+ Result.Nodes.getNodeAs("ptr_fun_call")) {
+diag(Call->getLocStart(), Message) << "'std::ptr_fun'";
+ } else if
alexfh added inline comments.
Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54
+ } else if (const auto *const Call =
+ Result.Nodes.getNodeAs("ptr_fun_call")) {
+diag(Call->getLocStart(), Message) << "'std::ptr_fun'";
+ } else if (const
aaron.ballman added inline comments.
Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54
+ } else if (const auto *const Call =
+ Result.Nodes.getNodeAs("ptr_fun_call")) {
+diag(Call->getLocStart(), Message) << "'std::ptr_fun'";
+ } else if
alexfh added inline comments.
Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54
+ } else if (const auto *const Call =
+ Result.Nodes.getNodeAs("ptr_fun_call")) {
+diag(Call->getLocStart(), Message) << "'std::ptr_fun'";
+ } else if (const
aaron.ballman added inline comments.
Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54
+ } else if (const auto *const Call =
+ Result.Nodes.getNodeAs("ptr_fun_call")) {
+diag(Call->getLocStart(), Message) << "'std::ptr_fun'";
+ } else if
alexfh added inline comments.
Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54
+ } else if (const auto *const Call =
+ Result.Nodes.getNodeAs("ptr_fun_call")) {
+diag(Call->getLocStart(), Message) << "'std::ptr_fun'";
+ } else if (const
aaron.ballman added inline comments.
Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54
+ } else if (const auto *const Call =
+ Result.Nodes.getNodeAs("ptr_fun_call")) {
+diag(Call->getLocStart(), Message) << "'std::ptr_fun'";
+ } else if
alexfh added inline comments.
Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54
+ } else if (const auto *const Call =
+ Result.Nodes.getNodeAs("ptr_fun_call")) {
+diag(Call->getLocStart(), Message) << "'std::ptr_fun'";
+ } else if (const
alexfh added inline comments.
Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54
+ } else if (const auto *const Call =
+ Result.Nodes.getNodeAs("ptr_fun_call")) {
+diag(Call->getLocStart(), Message) << "'std::ptr_fun'";
+ } else if (const
aaron.ballman added inline comments.
Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:33
+ this);
+ Finder->addMatcher(callExpr(callee(functionDecl(hasName("std::mem_fun"
+ .bind("mem_fun_call"),
massberg marked 8 inline comments as done.
massberg added a comment.
Thanks for the comments!
Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:26
+.bind("base")),
+ anyOf(isClass(),
massberg updated this revision to Diff 134578.
massberg edited the summary of this revision.
https://reviews.llvm.org/D42730
Files:
clang-tidy/modernize/CMakeLists.txt
clang-tidy/modernize/DeprecatedFunctionalCheck.cpp
clang-tidy/modernize/DeprecatedFunctionalCheck.h
aaron.ballman added inline comments.
Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:26
+.bind("base")),
+ anyOf(isClass(), ast_matchers::isStruct()),
+
massberg marked 4 inline comments as done.
massberg added a comment.
Thanks for the comments!
I double-checked that the renaming went well and hope that I haven't missed
anything this time ...
https://reviews.llvm.org/D42730
___
cfe-commits
massberg updated this revision to Diff 133027.
massberg edited the summary of this revision.
massberg added a comment.
Addressed comments and renamed test to modernize-deprecated-functional
https://reviews.llvm.org/D42730
Files:
clang-tidy/modernize/CMakeLists.txt
aaron.ballman added inline comments.
Comment at: clang-tidy/modernize/ModernizeTidyModule.cpp:50
+CheckFactories.registerCheck(
+"modernize-avoid-functional");
CheckFactories.registerCheck(
alexfh wrote:
> aaron.ballman wrote:
> > I'm not keen
alexfh added inline comments.
Comment at: clang-tidy/modernize/ModernizeTidyModule.cpp:50
+CheckFactories.registerCheck(
+"modernize-avoid-functional");
CheckFactories.registerCheck(
aaron.ballman wrote:
> I'm not keen on this name -- it
aaron.ballman requested changes to this revision.
aaron.ballman added a comment.
This revision now requires changes to proceed.
A few comments were not applied, and I'd like a more descriptive name for the
check (especially if we plan to generalize this).
Comment at:
alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.
LG
Comment at: clang-tidy/modernize/AvoidFunctionalCheck.h:19
+
+/// Check for several deprecated types and classes from header
+///
aaron.ballman wrote:
>
massberg updated this revision to Diff 132592.
massberg marked an inline comment as done.
https://reviews.llvm.org/D42730
Files:
clang-tidy/modernize/AvoidFunctionalCheck.cpp
clang-tidy/modernize/AvoidFunctionalCheck.h
clang-tidy/modernize/CMakeLists.txt
aaron.ballman added inline comments.
Comment at: clang-tidy/modernize/AvoidFunctionalCheck.h:19
+
+/// Check for several deprecated types and classes from header
+///
alexfh wrote:
> aaron.ballman wrote:
> > alexfh wrote:
> > > aaron.ballman wrote:
> > > >
alexfh added inline comments.
Comment at: clang-tidy/modernize/AvoidFunctionalCheck.cpp:22
+ Finder->addMatcher(
+ cxxRecordDecl(allOf(anyOf(isDerivedFrom("std::binary_function"),
+isDerivedFrom("std::unary_function")),
massberg marked 5 inline comments as done.
massberg added inline comments.
Comment at: test/clang-tidy/modernize-avoid-functional.cpp:30
+
+// CHECK-MESSAGES: [[@LINE+1]]:25: warning: 'binary_function'
is deprecated in C++11 and removed in C++17
massberg updated this revision to Diff 132538.
massberg added a comment.
Addressed comments of reviewers.
https://reviews.llvm.org/D42730
Files:
clang-tidy/modernize/AvoidFunctionalCheck.cpp
clang-tidy/modernize/AvoidFunctionalCheck.h
clang-tidy/modernize/CMakeLists.txt
aaron.ballman added inline comments.
Comment at: clang-tidy/modernize/AvoidFunctionalCheck.h:19
+
+/// Check for several deprecated types and classes from header
+///
alexfh wrote:
> aaron.ballman wrote:
> > alexfh wrote:
> > > Quuxplusone wrote:
> > > >
alexfh added inline comments.
Comment at: clang-tidy/modernize/AvoidFunctionalCheck.h:19
+
+/// Check for several deprecated types and classes from header
+///
aaron.ballman wrote:
> alexfh wrote:
> > Quuxplusone wrote:
> > > aaron.ballman wrote:
> > > > alexfh
aaron.ballman added inline comments.
Comment at: clang-tidy/modernize/AvoidFunctionalCheck.h:19
+
+/// Check for several deprecated types and classes from header
+///
alexfh wrote:
> Quuxplusone wrote:
> > aaron.ballman wrote:
> > > alexfh wrote:
> > > > alexfh
alexfh added inline comments.
Comment at: clang-tidy/modernize/AvoidFunctionalCheck.h:19
+
+/// Check for several deprecated types and classes from header
+///
Quuxplusone wrote:
> aaron.ballman wrote:
> > alexfh wrote:
> > > alexfh wrote:
> > > > aaron.ballman
30 matches
Mail list logo