[PATCH] D44346: [clang-tidy] Add Zircon module to clang-tidy
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 13 18:13:16 PDT 2018
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: creating a temporary object of type 'Foo' is prohibited
----------------
Why? I thought `Bar` was allowed, but `NS::Bar` was prohibited?
================
Comment at: test/clang-tidy/zircon-temporary-objects.cpp:95
+
+// Inheriting the disallowed class does not trigger the check.
+
----------------
The documentation should explicitly call this out, as it's different than I would have expected (I was assuming the derived classes would inherit the prohibition).
================
Comment at: test/clang-tidy/zircon-temporary-objects.cpp:107-108
+void f3() {
+ Quux<NS::Bar>(); // Diagnose
+ Quux<Bar>(); // Fine?
+}
----------------
The comments here seem amiss.
https://reviews.llvm.org/D44346
More information about the cfe-commits
mailing list