Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-24 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261738: [clang-tidy] introduce modernize-deprecated-headers check (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D17484?vs=48905&id=48919#toc Repository: rL LLVM http://revie

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-24 Thread Kirill Bobyrev via cfe-commits
omtcyf0 added a comment. In http://reviews.llvm.org/D17484#359634, @alexfh wrote: > Looks good with one nit. > > Let me know if you need me to commit the patch for you. Yes, commit please! http://reviews.llvm.org/D17484 ___ cfe-commits mailing li

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-24 Thread Kirill Bobyrev via cfe-commits
omtcyf0 updated this revision to Diff 48905. omtcyf0 added a comment. replaced few explicit casts to llvm::Twine with implicit ones http://reviews.llvm.org/D17484 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/DeprecatedHeadersCheck.cpp clang-tidy/modernize/DeprecatedHead

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-23 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good with one nit. Let me know if you need me to commit the patch for you. Comment at: clang-tidy/modernize/DeprecatedHeadersCheck.cpp:99 @@ +98,3 @@ +std::string R

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-23 Thread Kirill Bobyrev via cfe-commits
omtcyf0 updated this revision to Diff 48799. omtcyf0 added a comment. changed the warning comment to be more precise; fixed line with > 80 symbols http://reviews.llvm.org/D17484 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/DeprecatedHeadersCheck.cpp clang-tidy/modernize

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-23 Thread Kirill Bobyrev via cfe-commits
omtcyf0 updated this revision to Diff 48797. omtcyf0 marked 4 inline comments as done. omtcyf0 added a comment. Resolved issues @alexfh pointed to. http://reviews.llvm.org/D17484 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/DeprecatedHeadersCheck.cpp clang-tidy/moderniz

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-22 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/DeprecatedHeadersCheck.cpp:78 @@ +77,3 @@ + if (LangOpts.CPlusPlus11) { +std::vector> Cxx11DeprecatedHeaders = { +{"fenv.h", "cfenv"}, This can be done without STL algorithms and lambdas:

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-22 Thread Kirill Bobyrev via cfe-commits
omtcyf0 added a comment. Marked the comments as *done*. Comment at: test/clang-tidy/modernize-deprecated-headers-cxx03.cpp:1 @@ +1,2 @@ +// RUN: %check_clang_tidy %s modernize-deprecated-headers %t -- -- -std=c++03 -isystem %S/Inputs/Headers + alexfh wrote: > Y

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-22 Thread Kirill Bobyrev via cfe-commits
omtcyf0 updated this revision to Diff 48711. omtcyf0 marked 9 inline comments as done. omtcyf0 added a comment. Fixed all the issues @alexfh pointed to. http://reviews.llvm.org/D17484 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/DeprecatedHeadersCheck.cpp clang-tidy/mod

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-22 Thread Kirill Bobyrev via cfe-commits
omtcyf0 added a comment. Thank you for a review, Alex! I'll clean up the parts you mentioned soon! In http://reviews.llvm.org/D17484#358617, @alexfh wrote: > The most important question to this check is that the standard doesn't > guarantee that the C++ headers declare all the same functions *

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-22 Thread Richard via cfe-commits
LegalizeAdulthood added a comment. In http://reviews.llvm.org/D17484#358617, @alexfh wrote: > Thank you for this check! Mostly looks good, but there are a number of style > nits. > > The most important question to this check is that the standard doesn't > guarantee that the C++ headers declare

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-22 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D17484#358617, @alexfh wrote: > ... the check in its current form can break the code that uses library > symbols from the global namespace. ... An action item for this is: document this possible issue and add a FIXME somewhere in the code to

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-22 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for this check! Mostly looks good, but there are a number of style nits. The most important question to this check is that the standard doesn't guarantee that the C++ headers declare all the same functions **in the global namespace** (at least, this is how I u

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-21 Thread Joerg Sonnenberger via cfe-commits
On Sun, Feb 21, 2016 at 02:26:30AM +, Eugene Zelenko via cfe-commits wrote: > Another idea: to replace limits.h with limits and also replace its > defines with their C++ counterparts. For example, INT_MIN with > numeric_limits::min(). I'm not sure how useful it is to write four times as much

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-21 Thread Kirill Bobyrev via cfe-commits
omtcyf0 marked 3 inline comments as done. omtcyf0 added a comment. http://reviews.llvm.org/D17484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-21 Thread Kirill Bobyrev via cfe-commits
omtcyf0 updated this revision to Diff 48613. omtcyf0 added a comment. Thanks for a review, Richard! Fixed all the issues you pointed to! Thanks for the hint, Eugene! I'll try to add this functionality to this check later on. http://reviews.llvm.org/D17484 Files: clang-tidy/modernize/CMakeLis

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-20 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment. Another idea: to replace limits.h with limits and also replace its defines with their C++ counterparts. For example, INT_MIN with numeric_limits::min(). Will be definitely useful for LLDB code modernization. http://reviews.llvm.org/D17484

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-20 Thread Richard via cfe-commits
LegalizeAdulthood added a comment. Other than a few nits, LGTM. Comment at: clang-tidy/modernize/DeprecatedHeadersCheck.cpp:54 @@ +53,3 @@ +: Check(Check), LangOpts(LangOpts) { + CStyledHeaderToCxx["assert.h"] = "cassert"; + CStyledHeaderToCxx["float.h"] = "cfloat"; --

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-20 Thread Kirill Bobyrev via cfe-commits
omtcyf0 updated this revision to Diff 48600. omtcyf0 added a comment. Thanks for a review, Eugene! The FixItHint and warning now comes with the "angled" version of header wrapping. http://reviews.llvm.org/D17484 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/DeprecatedHea

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-20 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment. Thank you for implementing this check! However, I think will be good idea to always wrap header name in <> for warning and FixIt. http://reviews.llvm.org/D17484 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

Re: [PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

2016-02-20 Thread Kirill Bobyrev via cfe-commits
omtcyf0 updated this revision to Diff 48598. omtcyf0 added a comment. fixed clang-tidy/modernize/DeprecatedHeaders.h head typo caused by the check rename http://reviews.llvm.org/D17484 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/DeprecatedHeadersCheck.cpp clang-tidy/m