This revision was automatically updated to reflect the committed changes.
Closed by commit rC334153: Change the wording of RTTI errors to make them more 
generic. (authored by ssrivastava, committed by ).
Repository:
  rC Clang

https://reviews.llvm.org/D47291

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  test/SemaCXX/no-rtti.cpp


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<B *>(a) != 0; // expected-error {{cannot use 
dynamic_cast with -fno-rtti}}
+  return dynamic_cast<B *>(a) != 0; // expected-error {{use of dynamic_cast 
requires -frtti}}
 }
 
 void* getMostDerived(A* a) {
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<B *>(a) != 0; // expected-error {{cannot use dynamic_cast with -fno-rtti}}
+  return dynamic_cast<B *>(a) != 0; // expected-error {{use of dynamic_cast requires -frtti}}
 }
 
 void* getMostDerived(A* a) {
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">;
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to