[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-14 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. juliehockett marked 2 inline comments as done. Closed by commit rL327590: [clang-tidy] Add Zircon module to clang-tidy (authored by juliehockett, committed by ). Herald added subscribers: llvm-commits, klimek. Changed

[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-14 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. LGTM with some minor documentation nits. Comment at: docs/clang-tidy/checks/zircon-temporary-objects.rst:7 +Warns on construction of specific temporary objects

[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-14 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 138470. juliehockett added a comment. Fixing a typo sorry https://reviews.llvm.org/D44346 Files: clang-tidy/CMakeLists.txt clang-tidy/tool/CMakeLists.txt clang-tidy/tool/ClangTidyMain.cpp clang-tidy/zircon/CMakeLists.txt

[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-14 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 138468. juliehockett marked 3 inline comments as done. juliehockett added a comment. Updating docs. https://reviews.llvm.org/D44346 Files: clang-tidy/CMakeLists.txt clang-tidy/tool/CMakeLists.txt clang-tidy/tool/ClangTidyMain.cpp

[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-14 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 138466. juliehockett marked 2 inline comments as done. juliehockett added a comment. Updating decl passed to warning string https://reviews.llvm.org/D44346 Files: clang-tidy/CMakeLists.txt clang-tidy/tool/CMakeLists.txt

[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/zircon/TemporaryObjectsCheck.cpp:51 + "creating a temporary object of type %0 is prohibited") +<< D->getConstructor()->getParent()->getQualifiedNameAsString(); +} aaron.ballman wrote: >

[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-14 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-tidy/fuchsia/FuchsiaTidyModule.cpp:44 +CheckFactories.registerCheck( +"fuchsia-zx-temporary-objects"); } aaron.ballman wrote: > Do we want a zircon module instead? I'm wondering about people

[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/zircon/TemporaryObjectsCheck.cpp:51 + "creating a temporary object of type %0 is prohibited") +<< D->getConstructor()->getParent()->getQualifiedNameAsString(); +} aaron.ballman wrote: >

[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-14 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 138392. juliehockett marked 3 inline comments as done. juliehockett added a comment. Fixing tests and updating docs https://reviews.llvm.org/D44346 Files: clang-tidy/CMakeLists.txt clang-tidy/tool/CMakeLists.txt clang-tidy/tool/ClangTidyMain.cpp

[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/zircon-temporary-objects.cpp:86 +Ty make_ty() { return Ty(); } +// CHECK-MESSAGES: :[[@LINE-1]]:23: warning: creating a temporary object of type 'Bar' is prohibited +// CHECK-MESSAGES: :[[@LINE-2]]:23: warning:

[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-13 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 138286. juliehockett marked 3 inline comments as done. juliehockett added a comment. Addomg tests amd fixing documentation https://reviews.llvm.org/D44346 Files: clang-tidy/CMakeLists.txt clang-tidy/tool/CMakeLists.txt

[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I dreamed up some test cases that may or may not make sense. I think they boil down to a few things: - Does inheriting from a prohibited type still diagnose when the derived type is used to construct a temporary? - Should it still be prohibited if the temporary

[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:77 +- New `zircon-temporary-objects + `_ check Please sort new checks in alphabetical order.

[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-13 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 138264. juliehockett marked 6 inline comments as done. juliehockett added a comment. Addressing comments https://reviews.llvm.org/D44346 Files: clang-tidy/CMakeLists.txt clang-tidy/tool/CMakeLists.txt clang-tidy/tool/ClangTidyMain.cpp

[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/tool/ClangTidyMain.cpp:527 -// This anchor is used to force the linker to link the GoogleModule. +// This anchor is used to force the linker to link the FuchsiaModule. extern volatile int FuchsiaModuleAnchorSource;

[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy

2018-03-13 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 138241. juliehockett marked 8 inline comments as done. juliehockett retitled this revision from "[clang-tidy] Add Fuchsia checker for temporary objects" to "[clang-tidy] Add Zircon module to clang-tidy". juliehockett edited the summary of this revision.