[PATCH] D47291: Proposal to make rtti errors more generic.
Phabricator via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 6 17:47:13 PDT 2018
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">;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47291.150234.patch
Type: text/x-patch
Size: 1331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180607/5c589aeb/attachment.bin>
More information about the cfe-commits
mailing list