Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: base/bind_unittest.nc

Issue 678263003: Switch to clang for nocompile tests and rebaseline existing results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Downcasting Pass Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/callback_unittest.nc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/bind_unittest.nc
diff --git a/base/bind_unittest.nc b/base/bind_unittest.nc
index de81646fbff713d06a6a835995a2aa8587e54659..4732097d776c242a2718c8a6ac35b880542a623e 100644
--- a/base/bind_unittest.nc
+++ b/base/bind_unittest.nc
@@ -64,7 +64,7 @@ template <typename T>
void VoidPolymorphic1(T t) {
}
-#if defined(NCTEST_METHOD_ON_CONST_OBJECT) // [r"invalid conversion from 'const base::NoRef\*' to 'base::NoRef\*'"]
+#if defined(NCTEST_METHOD_ON_CONST_OBJECT) // [r"fatal error: cannot initialize a parameter of type 'base::NoRef \*' with an lvalue of type 'typename enable_if<!IsMoveOnlyType<const HasRef \*const>::value, const HasRef \*const>::type' \(aka 'const base::HasRef \*const'\)"]
// Method bound to const-object.
//
@@ -77,7 +77,7 @@ void WontCompile() {
method_to_const_cb.Run();
}
-#elif defined(NCTEST_METHOD_BIND_NEEDS_REFCOUNTED_OBJECT) // [r"has no member named 'AddRef'"]
+#elif defined(NCTEST_METHOD_BIND_NEEDS_REFCOUNTED_OBJECT) // [r"fatal error: no member named 'AddRef' in 'base::NoRef'"]
// Method bound to non-refcounted object.
//
@@ -89,7 +89,7 @@ void WontCompile() {
no_ref_cb.Run();
}
-#elif defined(NCTEST_CONST_METHOD_NEEDS_REFCOUNTED_OBJECT) // [r"has no member named 'AddRef'"]
+#elif defined(NCTEST_CONST_METHOD_NEEDS_REFCOUNTED_OBJECT) // [r"fatal error: no member named 'AddRef' in 'base::NoRef'"]
// Const Method bound to non-refcounted object.
//
@@ -101,7 +101,7 @@ void WontCompile() {
no_ref_const_cb.Run();
}
-#elif defined(NCTEST_CONST_POINTER) // [r"invalid conversion from 'const base::NoRef\*' to 'base::NoRef\*'"]
+#elif defined(NCTEST_CONST_POINTER) // [r"fatal error: reference to type 'base::NoRef \*const' could not bind to an lvalue of type 'typename enable_if<!IsMoveOnlyType<const NoRef \*const>::value, const NoRef \*const>::type' \(aka 'const base::NoRef \*const'\)"]
// Const argument used with non-const pointer parameter of same type.
//
@@ -113,7 +113,7 @@ void WontCompile() {
pointer_same_cb.Run();
}
-#elif defined(NCTEST_CONST_POINTER_SUBTYPE) // [r"'const base::NoRefParent\*' to 'base::NoRefParent\*'"]
+#elif defined(NCTEST_CONST_POINTER_SUBTYPE) // [r"fatal error: reference to type 'base::NoRefParent \*const' could not bind to an lvalue of type 'typename enable_if<!IsMoveOnlyType<const NoRefChild \*const>::value, const NoRefChild \*const>::type' \(aka 'const base::NoRefChild \*const'\)"]
// Const argument used with non-const pointer parameter of super type.
//
@@ -125,10 +125,10 @@ void WontCompile() {
pointer_super_cb.Run();
}
-#elif defined(DISABLED_NCTEST_DISALLOW_NON_CONST_REF_PARAM) // [r"badstring"]
-// I think there's a type safety promotion issue here where we can pass a const
-// ref to a non const-ref function, or vice versa accidentally. Or we make a
-// copy accidentally. Check.
+#elif defined(DISABLED_NCTEST_DISALLOW_NON_CONST_REF_PARAM) // [r"fatal error: no member named 'AddRef' in 'base::NoRef'"]
+// TODO(dcheng): I think there's a type safety promotion issue here where we can
+// pass a const ref to a non const-ref function, or vice versa accidentally. Or
+// we make a copy accidentally. Check.
// Functions with reference parameters, unsupported.
//
@@ -142,7 +142,7 @@ void WontCompile() {
ref_arg_cb.Run(p);
}
-#elif defined(NCTEST_DISALLOW_BIND_TO_NON_CONST_REF_PARAM) // [r"size of array is negative"]
+#elif defined(NCTEST_DISALLOW_BIND_TO_NON_CONST_REF_PARAM) // [r"fatal error: static_assert failed \"do_not_bind_functions_with_nonconst_ref\""]
// Binding functions with reference parameters, unsupported.
//
@@ -153,7 +153,7 @@ void WontCompile() {
ref_cb.Run();
}
-#elif defined(NCTEST_NO_IMPLICIT_ARRAY_PTR_CONVERSION) // [r"size of array is negative"]
+#elif defined(NCTEST_NO_IMPLICIT_ARRAY_PTR_CONVERSION) // [r"fatal error: static_assert failed \"first_bound_argument_to_method_cannot_be_array\""]
// A method should not be bindable with an array of objects.
//
@@ -167,7 +167,7 @@ void WontCompile() {
method_bound_to_array_cb.Run();
}
-#elif defined(NCTEST_NO_RAW_PTR_FOR_REFCOUNTED_TYPES) // [r"size of array is negative"]
+#elif defined(NCTEST_NO_RAW_PTR_FOR_REFCOUNTED_TYPES) // [r"fatal error: static_assert failed \"p1_is_refcounted_type_and_needs_scoped_refptr\""]
// Refcounted types should not be bound as a raw pointer.
void WontCompile() {
@@ -179,7 +179,7 @@ void WontCompile() {
Bind(&VoidPolymorphic1<HasRef*>, &for_raw_ptr);
}
-#elif defined(NCTEST_WEAKPTR_BIND_MUST_RETURN_VOID) // [r"size of array is negative"]
+#elif defined(NCTEST_WEAKPTR_BIND_MUST_RETURN_VOID) // [r"fatal error: static_assert failed \"weak_ptrs_can_only_bind_to_methods_without_return_values\""]
// WeakPtrs cannot be bound to methods with return types.
void WontCompile() {
@@ -190,7 +190,7 @@ void WontCompile() {
weak_ptr_with_non_void_return_type.Run();
}
-#elif defined(NCTEST_DISALLOW_ASSIGN_DIFFERENT_TYPES) // [r"conversion from 'base::Callback<void\(int\)>' to non-scalar type"]
+#elif defined(NCTEST_DISALLOW_ASSIGN_DIFFERENT_TYPES) // [r"fatal error: no viable conversion from 'Callback<typename internal::BindState<typename internal::FunctorTraits<void \(\*\)\(int\)>::RunnableType, typename internal::FunctorTraits<void \(\*\)\(int\)>::RunType, void \(\)>::UnboundRunType>' to 'Callback<void \(\)>'"]
// Bind result cannot be assigned to Callbacks with a mismatching type.
void WontCompile() {
« no previous file with comments | « no previous file | base/callback_unittest.nc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698