[PATCH] D60139: [clang-tidy] Add bugprone-placement-new-target-type-mismatch check

2019-04-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D60139#1461269 , @DennisL wrote: > In D60139#1460233 , @JonasToth wrote: > > > Hey Dennis, > > > > my 2cents on the check. I think it is very good to have! Did you check > >

[PATCH] D60139: [clang-tidy] Add bugprone-placement-new-target-type-mismatch check

2019-04-10 Thread Dennis Luxen via Phabricator via cfe-commits
DennisL updated this revision to Diff 194505. DennisL marked an inline comment as done. DennisL added a comment. Changed the following - addressed reviewer feedback - fetch the placement parameter as written - add further test cases as requested - stylistic changes - add nothrow parameter

[PATCH] D60139: [clang-tidy] Add bugprone-placement-new-target-type-mismatch check

2019-04-10 Thread Dennis Luxen via Phabricator via cfe-commits
DennisL marked 12 inline comments as done. DennisL added a comment. In D60139#1460233 , @JonasToth wrote: > Hey Dennis, > > my 2cents on the check. I think it is very good to have! Did you check coding > guidelines if they say something to this issue?

[PATCH] D60139: [clang-tidy] Add bugprone-placement-new-target-type-mismatch check

2019-04-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/PlacementNewTargetTypeMismatch.cpp:38 + const CastExpr *Cast = dyn_cast(PlacementExpr); + if (nullptr == Cast) { +return; JonasToth wrote: > braces, above the comment does not follow the

[PATCH] D60139: [clang-tidy] Add bugprone-placement-new-target-type-mismatch check

2019-04-09 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Hey Dennis, my 2cents on the check. I think it is very good to have! Did you check coding guidelines if they say something to this issue? (e.g. cppcoreguidelines, hicpp, cert) As we have modules for them it would be great to make aliases to this check if they demand

[PATCH] D60139: [clang-tidy] Add bugprone-placement-new-target-type-mismatch check

2019-04-09 Thread Dennis Luxen via Phabricator via cfe-commits
DennisL updated this revision to Diff 194283. DennisL added a comment. - handle array to ptr decay - updated error msg - additional tests for arry to ptr decay CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60139/new/ https://reviews.llvm.org/D60139 Files:

[PATCH] D60139: [clang-tidy] Add bugprone-placement-new-target-type-mismatch check

2019-04-08 Thread Dennis Luxen via Phabricator via cfe-commits
DennisL updated this revision to Diff 194137. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60139/new/ https://reviews.llvm.org/D60139 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/PlacementNewTargetTypeMismatch.cpp

[PATCH] D60139: [clang-tidy] Add bugprone-placement-new-target-type-mismatch check

2019-04-08 Thread Dennis Luxen via Phabricator via cfe-commits
DennisL updated this revision to Diff 194136. DennisL retitled this revision from "[clang-tidy] Add misc-placement-new-target-type-mismatch check" to "[clang-tidy] Add bugprone-placement-new-target-type-mismatch check". DennisL added a comment. Removed debug output CHANGES SINCE LAST ACTION