summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX')
-rw-r--r--clang/test/SemaCXX/conditional-expr.cpp11
-rw-r--r--clang/test/SemaCXX/elaborated-type-specifier.cpp2
-rw-r--r--clang/test/SemaCXX/member-location.cpp2
3 files changed, 7 insertions, 8 deletions
diff --git a/clang/test/SemaCXX/conditional-expr.cpp b/clang/test/SemaCXX/conditional-expr.cpp
index 0f71b494661..0617cd5702c 100644
--- a/clang/test/SemaCXX/conditional-expr.cpp
+++ b/clang/test/SemaCXX/conditional-expr.cpp
@@ -25,7 +25,7 @@ struct Derived : Base {
void fn2();
};
struct Convertible { operator Base&(); };
-struct Priv : private Base {}; // expected-note 2 {{'private' inheritance specifier here}}
+struct Priv : private Base {}; // expected-note 4 {{'private' inheritance specifier here}}
struct Mid : Base {};
struct Fin : Mid, Derived {};
typedef void (Derived::*DFnPtr)();
@@ -109,13 +109,12 @@ void test()
(void)(i1 ? Base() : constder()); // expected-error {{incompatible operand types ('struct Base' and 'struct Derived const')}}
(void)(i1 ? constder() : Base()); // expected-error {{incompatible operand types ('struct Derived const' and 'struct Base')}}
- // FIXME: these are invalid hierarchy conversions
Priv priv;
Fin fin;
- (void)(i1 ? Base() : Priv()); // xpected-error private base
- (void)(i1 ? Priv() : Base()); // xpected-error private base
- (void)(i1 ? Base() : Fin()); // xpected-error ambiguous base
- (void)(i1 ? Fin() : Base()); // xpected-error ambiguous base
+ (void)(i1 ? Base() : Priv()); // expected-error{{conversion from 'struct Priv' to inaccessible base class 'struct Base'}}
+ (void)(i1 ? Priv() : Base()); // expected-error{{error: conversion from 'struct Priv' to inaccessible base class 'struct Base'}}
+ (void)(i1 ? Base() : Fin()); // expected-error{{ambiguous conversion from derived class 'struct Fin' to base class 'struct Base'}}
+ (void)(i1 ? Fin() : Base()); // expected-error{{ambiguous conversion from derived class 'struct Fin' to base class 'struct Base'}}
(void)(i1 ? base : priv); // expected-error {{conversion from 'struct Priv' to inaccessible base class 'struct Base'}}
(void)(i1 ? priv : base); // expected-error {{conversion from 'struct Priv' to inaccessible base class 'struct Base'}}
(void)(i1 ? base : fin); // expected-error {{ambiguous conversion from derived class 'struct Fin' to base class 'struct Base'}}
diff --git a/clang/test/SemaCXX/elaborated-type-specifier.cpp b/clang/test/SemaCXX/elaborated-type-specifier.cpp
index 40816d8823e..8d2d67f705c 100644
--- a/clang/test/SemaCXX/elaborated-type-specifier.cpp
+++ b/clang/test/SemaCXX/elaborated-type-specifier.cpp
@@ -27,7 +27,7 @@ namespace NS {
void test_X_elab(NS::X x) {
struct S4 *s4 = 0;
- x.test_elab2(s4); // expected-error{{incompatible type passing 'struct S4 *', expected 'struct NS::S4 *'}}
+ x.test_elab2(s4); // expected-error{{cannot initialize a parameter of type 'struct NS::S4 *' with an lvalue of type 'struct S4 *'}}
}
namespace NS {
diff --git a/clang/test/SemaCXX/member-location.cpp b/clang/test/SemaCXX/member-location.cpp
index 42e7c799a83..c3099d25e0e 100644
--- a/clang/test/SemaCXX/member-location.cpp
+++ b/clang/test/SemaCXX/member-location.cpp
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
// PR4103: Make sure we have a location for the error
class A { float a(int *); int b(); };
-int A::b() { return a(a((int*)0)); } // expected-error {{incompatible type}}
+int A::b() { return a(a((int*)0)); } // expected-error {{cannot initialize a parameter of type 'int *' with an rvalue of type 'float'}}
OpenPOWER on IntegriCloud