Sunil_Srivastava updated this revision to Diff 150038.
Sunil_Srivastava added a comment.
Changed as per Paul's suggestion.
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
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits