mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-23 17:48:03 +00:00
Change the wording of RTTI errors to make them more generic.
An attempt to use dynamic_cast while rtti is disabled, used to emit the error: cannot use dynamic_cast with -fno-rtti and a similar one for typeid. This patch changes that to: use of dynamic_cast requires -frtti Differential Revision: https://reviews.llvm.org/D47291 llvm-svn: 334153
This commit is contained in:
parent
661d81ef61
commit
a74031b640
clang
@ -6607,9 +6607,9 @@ def err_not_tag_in_scope : Error<
|
||||
"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">;
|
||||
|
@ -6,7 +6,7 @@ namespace std {
|
||||
|
||||
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 @@ struct B : public A {
|
||||
}
|
||||
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user