[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-02-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325572: [clang-tidy] Replace the usage of std::uncaught_exception with std… (authored by xazax, committed by ). Herald added subscribers: llvm-commits, klimek. Changed prior to commit:

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-02-12 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 133814. https://reviews.llvm.org/D40787 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.h

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-02-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. This LGTM with a few minor nits to fix. Comment at: clang-tidy/modernize/ModernizeTidyModule.cpp:80-81

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-02-02 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 132595. https://reviews.llvm.org/D40787 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.h

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/modernize-use-uncaught-exceptions.cpp:64 + // CHECK-MESSAGES: [[@LINE-1]]:10: warning: 'std::uncaught_exception' is deprecated, use 'std::uncaught_exceptions' instead + // CHECK-FIXES: foo = _exceptions; +

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-24 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added inline comments. Herald added a subscriber: hintonda. Comment at: test/clang-tidy/modernize-use-uncaught-exceptions.cpp:64 + // CHECK-MESSAGES: [[@LINE-1]]:10: warning: 'std::uncaught_exception' is deprecated, use 'std::uncaught_exceptions' instead + //

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp:45 + + if ((C = Result.Nodes.getNodeAs("call_expr"))) { +BeginLoc = C->getLocStart(); Can remove spurious parens. Comment at:

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-22 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 130905. https://reviews.llvm.org/D40787 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.h

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-01 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added inline comments. Comment at: clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp:66-67 +} +Diag << FixItHint::CreateInsertion(BeginLoc.getLocWithOffset(TextLength), + "s"); + } aaron.ballman wrote: >

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp:66-67 +} +Diag << FixItHint::CreateInsertion(BeginLoc.getLocWithOffset(TextLength), + "s"); + } koldaniel wrote: >

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-01 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added inline comments. Comment at: clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp:66-67 +} +Diag << FixItHint::CreateInsertion(BeginLoc.getLocWithOffset(TextLength), + "s"); + } aaron.ballman wrote: >

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp:24 + + const char *MatchText = "::std::uncaught_exception"; + You might as well make this a `std::string` rather than `const char *` because the `hasName()`

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-01 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 128390. https://reviews.llvm.org/D40787 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.h

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2017-12-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/ReplaceUncaughtExceptionCheck.cpp:59 + if (!BeginLoc.isMacroID()) { +Diag << FixItHint::CreateInsertion(BeginLoc.getLocWithOffset(TextLength), + "s");

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2017-12-08 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang-tidy/modernize/ReplaceUncaughtExceptionCheck.cpp:59 + if (!BeginLoc.isMacroID()) { +Diag << FixItHint::CreateInsertion(BeginLoc.getLocWithOffset(TextLength), + "s");

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2017-12-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/ReplaceUncaughtExceptionCheck.cpp:59 + if (!BeginLoc.isMacroID()) { +Diag << FixItHint::CreateInsertion(BeginLoc.getLocWithOffset(TextLength), + "s");

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2017-12-04 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/modernize/ReplaceUncaughtExceptionCheck.cpp:32 + Finder->addMatcher( + declRefExpr(to(functionDecl(hasName(MatchText.bind("call_expr"), + this); koldaniel wrote: > JonasToth wrote: > >

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2017-12-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. I think will be good idea to rename check to //modernize-use-uncaught-exceptions// to be consistent with other similar checks. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). Repository: rCTE Clang Tools Extra

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2017-12-04 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added inline comments. Comment at: clang-tidy/modernize/ReplaceUncaughtExceptionCheck.cpp:32 + Finder->addMatcher( + declRefExpr(to(functionDecl(hasName(MatchText.bind("call_expr"), + this); JonasToth wrote: > Interesting. Did you

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2017-12-04 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/modernize/ReplaceUncaughtExceptionCheck.cpp:20 + +static const char *MatchText = "::std::uncaught_exception"; + Could that be a local variable in `registerMatchers`? Even though its static and const it