Create a new PrintingPolicy class, which we pass down through the AST
printing logic to help customize the output. For now, we use this
rather than a special flag to suppress the "struct" when printing
"struct X" and to print the Boolean type as "bool" in C++ but "_Bool"
in C.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72590 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/bool.cpp b/test/SemaCXX/bool.cpp
index c5ad30e..bc44c73 100644
--- a/test/SemaCXX/bool.cpp
+++ b/test/SemaCXX/bool.cpp
@@ -13,4 +13,6 @@
b++; // expected-warning {{incrementing expression of type bool is deprecated}}
--b; // expected-error {{cannot decrement expression of type bool}}
b--; // expected-error {{cannot decrement expression of type bool}}
+
+ bool *b1 = (int *)0; // expected-error{{expected 'bool *'}}
}
diff --git a/test/SemaCXX/convert-to-bool.cpp b/test/SemaCXX/convert-to-bool.cpp
index 638afd0..937b272 100644
--- a/test/SemaCXX/convert-to-bool.cpp
+++ b/test/SemaCXX/convert-to-bool.cpp
@@ -44,7 +44,7 @@
void test_explicit_bool(ExplicitConvToBool ecb) {
bool b1(ecb); // okay
- bool b2 = ecb; // expected-error{{incompatible type initializing 'struct ExplicitConvToBool', expected '_Bool'}}
+ bool b2 = ecb; // expected-error{{incompatible type initializing 'struct ExplicitConvToBool', expected 'bool'}}
accepts_bool(ecb); // expected-error{{no matching function for call to}}
}
diff --git a/test/SemaCXX/overloaded-operator.cpp b/test/SemaCXX/overloaded-operator.cpp
index 2bf8a35..916d753 100644
--- a/test/SemaCXX/overloaded-operator.cpp
+++ b/test/SemaCXX/overloaded-operator.cpp
@@ -67,7 +67,7 @@
float &f1 = (e1 == e2);
float &f2 = (enum1 == e2);
float &f3 = (e1 == enum2);
- float &f4 = (enum1 == enum2); // expected-error{{non-const lvalue reference to type 'float' cannot be initialized with a temporary of type '_Bool'}}
+ float &f4 = (enum1 == enum2); // expected-error{{non-const lvalue reference to type 'float' cannot be initialized with a temporary of type 'bool'}}
}
diff --git a/test/SemaTemplate/typename-specifier-2.cpp b/test/SemaTemplate/typename-specifier-2.cpp
index 3aebb9a..99e6285 100644
--- a/test/SemaTemplate/typename-specifier-2.cpp
+++ b/test/SemaTemplate/typename-specifier-2.cpp
@@ -18,7 +18,7 @@
// 'aka' telling us that we're dealing with an int**. Should we fix
// getDesugaredType to dig through pointers and such?
bind_metafun<add_pointer, int>::type::type ip = &i;
-bind_metafun<add_pointer, float>::type::type fp = &i; // expected-error{{incompatible type initializing 'int *', expected 'bind_metafun<struct add_pointer, float>::type::type' (aka 'float *')}}
+bind_metafun<add_pointer, float>::type::type fp = &i; // expected-error{{incompatible type initializing 'int *', expected 'bind_metafun<add_pointer, float>::type::type' (aka 'float *')}}
template<typename T>