Index: include/clang/Basic/DiagnosticSemaKinds.td =================================================================== --- include/clang/Basic/DiagnosticSemaKinds.td +++ include/clang/Basic/DiagnosticSemaKinds.td @@ -6607,9 +6607,9 @@ "no %select{struct|interface|union|class|enum}0 named %1 in %2">; def err_no_typeid_with_fno_rtti : Error< - "cannot use typeid with -fno-rtti">; + "use of typeid requires -frtti">; def err_no_dynamic_cast_with_fno_rtti : Error< - "cannot use dynamic_cast with -fno-rtti">; + "use of dynamic_cast requires -frtti">; def err_cannot_form_pointer_to_member_of_reference_type : Error< "cannot form a pointer-to-member to member %0 of reference type %1">; Index: test/SemaCXX/no-rtti.cpp =================================================================== --- test/SemaCXX/no-rtti.cpp +++ test/SemaCXX/no-rtti.cpp @@ -6,7 +6,7 @@ void f() { - (void)typeid(int); // expected-error {{cannot use typeid with -fno-rtti}} + (void)typeid(int); // expected-error {{use of typeid requires -frtti}} } namespace { @@ -20,7 +20,7 @@ } bool isa_B(A *a) { - return dynamic_cast(a) != 0; // expected-error {{cannot use dynamic_cast with -fno-rtti}} + return dynamic_cast(a) != 0; // expected-error {{use of dynamic_cast requires -frtti}} } void* getMostDerived(A* a) {