[PATCH] D47291: Proposal to make rtti errors more generic.
Filipe Cabecinhas via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 25 06:51:58 PDT 2018
filcab added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6729
def err_no_dynamic_cast_with_fno_rtti : Error<
- "cannot use dynamic_cast with -fno-rtti">;
+ "use of dynamic_cast requires enabling RTTI">;
I'd prefer to have the way to enable RTTI mentioned in the message. Could we have something like `ToolChain::getRTTIMode()` and have a "RTTI was on/of" or "RTTI defaulted to on/off"? That way we'd be able to have a message similar to the current one (mentioning "you passed -fno-rtti") on platforms that default to RTTI=on, and have your updated message (possibly with a mention of "use -frtti") on platforms that default to RTTI=off.
(This is a minor usability comment about this patch, I don't consider it a blocker or anything)
More information about the cfe-commits