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

Unified Diff: base/memory/scoped_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: Created 6 years, 2 months 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
Index: base/memory/scoped_ptr_unittest.nc
diff --git a/base/memory/scoped_ptr_unittest.nc b/base/memory/scoped_ptr_unittest.nc
index 2e2a3e5752f67afad7e7b4c55bb70890f93e961e..1edb533da374e1d0970d50d67e390fb0558ecfd0 100644
--- a/base/memory/scoped_ptr_unittest.nc
+++ b/base/memory/scoped_ptr_unittest.nc
@@ -19,26 +19,20 @@ class RefCountedClass : public base::RefCountedThreadSafe<RefCountedClass> {
} // namespace
-#if defined(NCTEST_NO_PASSAS_DOWNCAST) // [r"invalid conversion from"]
-
-scoped_ptr<Child> DowncastUsingPassAs(scoped_ptr<Parent> object) {
- return object.PassAs<Child>();
danakj 2014/11/03 16:05:13 Should we have a case of object.Pass(); where the
dcheng 2014/11/03 18:58:18 Good point. Changed this to DowncastUsingPass.
-}
-
-#elif defined(NCTEST_NO_REF_COUNTED_SCOPED_PTR) // [r"size of array is negative"]
+#if defined(NCTEST_NO_REF_COUNTED_SCOPED_PTR) // [r"fatal error: static_assert failed \"T_is_refcounted_type_and_needs_scoped_refptr\""]
// scoped_ptr<> should not work for ref-counted objects.
void WontCompile() {
scoped_ptr<RefCountedClass> x;
}
-#elif defined(NCTEST_NO_ARRAY_WITH_SIZE) // [r"size of array is negative"]
+#elif defined(NCTEST_NO_ARRAY_WITH_SIZE) // [r"fatal error: static_assert failed \"do_not_use_array_with_size_as_type\""]
void WontCompile() {
scoped_ptr<int[10]> x;
}
-#elif defined(NCTEST_NO_PASS_FROM_ARRAY) // [r"size of array is negative"]
+#elif defined(NCTEST_NO_PASS_FROM_ARRAY) // [r"fatal error: static_assert failed \"U_cannot_be_an_array\""]
void WontCompile() {
scoped_ptr<int[]> a;
@@ -46,7 +40,7 @@ void WontCompile() {
b = a.Pass();
}
-#elif defined(NCTEST_NO_PASS_TO_ARRAY) // [r"no match for 'operator='"]
+#elif defined(NCTEST_NO_PASS_TO_ARRAY) // [r"fatal error: no viable overloaded '='"]
void WontCompile() {
scoped_ptr<int*> a;
@@ -54,14 +48,14 @@ void WontCompile() {
b = a.Pass();
}
-#elif defined(NCTEST_NO_CONSTRUCT_FROM_ARRAY) // [r"is private"]
+#elif defined(NCTEST_NO_CONSTRUCT_FROM_ARRAY) // [r"fatal error: 'impl_' is a private member of 'scoped_ptr<int \[\], base::DefaultDeleter<int \[\]> >'"]
void WontCompile() {
scoped_ptr<int[]> a;
scoped_ptr<int*> b(a.Pass());
}
-#elif defined(NCTEST_NO_CONSTRUCT_TO_ARRAY) // [r"no matching function for call"]
+#elif defined(NCTEST_NO_CONSTRUCT_TO_ARRAY) // [r"fatal error: no matching constructor for initialization of 'scoped_ptr<int \[\]>'"]
void WontCompile() {
scoped_ptr<int*> a;
@@ -74,7 +68,7 @@ void WontCompile() {
scoped_ptr<int[]> x(NULL);
}
-#elif defined(NCTEST_NO_CONSTRUCT_SCOPED_PTR_ARRAY_FROM_DERIVED) // [r"is private"]
+#elif defined(NCTEST_NO_CONSTRUCT_SCOPED_PTR_ARRAY_FROM_DERIVED) // [r"fatal error: calling a private constructor of class 'scoped_ptr<\(anonymous namespace\)::Parent \[\], base::DefaultDeleter<\(anonymous namespace\)::Parent \[\]> >'"]
void WontCompile() {
scoped_ptr<Parent[]> x(new Child[1]);
@@ -87,14 +81,14 @@ void WontCompile() {
x.reset(NULL);
}
-#elif defined(NCTEST_NO_RESET_SCOPED_PTR_ARRAY_FROM_DERIVED) // [r"is private"]
+#elif defined(NCTEST_NO_RESET_SCOPED_PTR_ARRAY_FROM_DERIVED) // [r"fatal error: 'reset' is a private member of 'scoped_ptr<\(anonymous namespace\)::Parent \[\], base::DefaultDeleter<\(anonymous namespace\)::Parent \[\]> >'"]
void WontCompile() {
scoped_ptr<Parent[]> x;
x.reset(new Child[1]);
}
-#elif defined(NCTEST_NO_DELETER_REFERENCE) // [r"fails to be a struct or class type"]
+#elif defined(NCTEST_NO_DELETER_REFERENCE) // [r"fatal error: base specifier must name a class"]
struct Deleter {
void operator()(int*) {}

Powered by Google App Engine
This is Rietveld 408576698