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

Unified Diff: base/memory/weak_ptr_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 | « base/memory/scoped_ptr_unittest.nc ('k') | build/nocompile.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/weak_ptr_unittest.nc
diff --git a/base/memory/weak_ptr_unittest.nc b/base/memory/weak_ptr_unittest.nc
index a2da8e9779f99c1d6505b4b9d4dabd463e69d2bc..2ab428d2abe8a3e48eda59fa65e7efe5cae648dd 100644
--- a/base/memory/weak_ptr_unittest.nc
+++ b/base/memory/weak_ptr_unittest.nc
@@ -14,7 +14,7 @@ struct MultiplyDerivedProducer : Producer,
struct Unrelated {};
struct DerivedUnrelated : Unrelated {};
-#if defined(NCTEST_AUTO_DOWNCAST) // [r"invalid conversion from"]
+#if defined(NCTEST_AUTO_DOWNCAST) // [r"fatal error: cannot initialize a member subobject of type 'base::DerivedProducer \*' with an lvalue of type 'base::Producer \*const'"]
void WontCompile() {
Producer f;
@@ -22,7 +22,7 @@ void WontCompile() {
WeakPtr<DerivedProducer> derived_ptr = ptr;
}
-#elif defined(NCTEST_STATIC_DOWNCAST) // [r"invalid conversion from"]
+#elif defined(NCTEST_STATIC_DOWNCAST) // [r"fatal error: cannot initialize a member subobject of type 'base::DerivedProducer \*' with an lvalue of type 'base::Producer \*const'"]
void WontCompile() {
Producer f;
@@ -31,7 +31,7 @@ void WontCompile() {
static_cast<WeakPtr<DerivedProducer> >(ptr);
}
-#elif defined(NCTEST_AUTO_REF_DOWNCAST) // [r"invalid initialization of reference"]
+#elif defined(NCTEST_AUTO_REF_DOWNCAST) // [r"fatal error: non-const lvalue reference to type 'WeakPtr<base::DerivedProducer>' cannot bind to a value of unrelated type 'WeakPtr<base::Producer>'"]
void WontCompile() {
Producer f;
@@ -39,7 +39,7 @@ void WontCompile() {
WeakPtr<DerivedProducer>& derived_ptr = ptr;
}
-#elif defined(NCTEST_STATIC_REF_DOWNCAST) // [r"invalid static_cast"]
+#elif defined(NCTEST_STATIC_REF_DOWNCAST) // [r"fatal error: non-const lvalue reference to type 'WeakPtr<base::DerivedProducer>' cannot bind to a value of unrelated type 'WeakPtr<base::Producer>'"]
void WontCompile() {
Producer f;
@@ -56,7 +56,7 @@ void WontCompile() {
SupportsWeakPtr<Producer>::StaticAsWeakPtr<DerivedProducer>(&f);
}
-#elif defined(NCTEST_UNSAFE_HELPER_DOWNCAST) // [r"invalid conversion from"]
+#elif defined(NCTEST_UNSAFE_HELPER_DOWNCAST) // [r"fatal error: cannot initialize a member subobject of type 'base::DerivedProducer \*' with an lvalue of type 'base::Producer \*const'"]
void WontCompile() {
Producer f;
@@ -70,35 +70,35 @@ void WontCompile() {
WeakPtr<DerivedProducer> ptr = AsWeakPtr<DerivedProducer>(&f);
}
-#elif defined(NCTEST_UNSAFE_WRONG_INSANTIATED_HELPER_DOWNCAST) // [r"invalid conversion from"]
+#elif defined(NCTEST_UNSAFE_WRONG_INSANTIATED_HELPER_DOWNCAST) // [r"fatal error: cannot initialize a member subobject of type 'base::DerivedProducer \*' with an lvalue of type 'base::Producer \*const'"]
void WontCompile() {
Producer f;
WeakPtr<DerivedProducer> ptr = AsWeakPtr<Producer>(&f);
}
-#elif defined(NCTEST_UNSAFE_HELPER_CAST) // [r"cannot convert"]
+#elif defined(NCTEST_UNSAFE_HELPER_CAST) // [r"fatal error: cannot initialize a member subobject of type 'base::OtherDerivedProducer \*' with an lvalue of type 'base::DerivedProducer \*const'"]
void WontCompile() {
DerivedProducer f;
WeakPtr<OtherDerivedProducer> ptr = AsWeakPtr(&f);
}
-#elif defined(NCTEST_UNSAFE_INSTANTIATED_HELPER_SIDECAST) // [r"no matching function"]
+#elif defined(NCTEST_UNSAFE_INSTANTIATED_HELPER_SIDECAST) // [r"fatal error: no matching function for call to 'AsWeakPtr'"]
void WontCompile() {
DerivedProducer f;
WeakPtr<OtherDerivedProducer> ptr = AsWeakPtr<OtherDerivedProducer>(&f);
}
-#elif defined(NCTEST_UNSAFE_WRONG_INSTANTIATED_HELPER_SIDECAST) // [r"cannot convert"]
+#elif defined(NCTEST_UNSAFE_WRONG_INSTANTIATED_HELPER_SIDECAST) // [r"fatal error: cannot initialize a member subobject of type 'base::OtherDerivedProducer \*' with an lvalue of type 'base::DerivedProducer \*const'"]
void WontCompile() {
DerivedProducer f;
WeakPtr<OtherDerivedProducer> ptr = AsWeakPtr<DerivedProducer>(&f);
}
-#elif defined(NCTEST_UNRELATED_HELPER) // [r"cannot convert"]
+#elif defined(NCTEST_UNRELATED_HELPER) // [r"fatal error: cannot initialize a member subobject of type 'base::Unrelated \*' with an lvalue of type 'base::DerivedProducer \*const'"]
void WontCompile() {
DerivedProducer f;
@@ -112,21 +112,21 @@ void WontCompile() {
WeakPtr<Unrelated> ptr = AsWeakPtr<Unrelated>(&f);
}
-#elif defined(NCTEST_COMPLETELY_UNRELATED_HELPER) // [r"size of array is negative"]
+#elif defined(NCTEST_COMPLETELY_UNRELATED_HELPER) // [r"fatal error: static_assert failed \"AsWeakPtr_argument_inherits_from_SupportsWeakPtr\""]
void WontCompile() {
Unrelated f;
WeakPtr<Unrelated> ptr = AsWeakPtr(&f);
}
-#elif defined(NCTEST_DERIVED_COMPLETELY_UNRELATED_HELPER) // [r"size of array is negative"]
+#elif defined(NCTEST_DERIVED_COMPLETELY_UNRELATED_HELPER) // [r"fatal error: static_assert failed \"AsWeakPtr_argument_inherits_from_SupportsWeakPtr\""]
void WontCompile() {
DerivedUnrelated f;
WeakPtr<Unrelated> ptr = AsWeakPtr(&f);
}
-#elif defined(NCTEST_AMBIGUOUS_ANCESTORS) // [r"ambiguous base"]
+#elif defined(NCTEST_AMBIGUOUS_ANCESTORS) // [r"fatal error: ambiguous conversion from derived class 'base::MultiplyDerivedProducer' to base class 'base::internal::SupportsWeakPtrBase':"]
void WontCompile() {
MultiplyDerivedProducer f;
« no previous file with comments | « base/memory/scoped_ptr_unittest.nc ('k') | build/nocompile.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698