diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 3400529c76..efc13a9284 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -379,6 +379,10 @@ Sema::ActOnCXXTypeid(SourceLocation OpLoc, SourceLocation LParenLoc, return ExprError(Diag(OpLoc, diag::err_need_header_before_typeid)); } + if (!getLangOpts().RTTI) { + return ExprError(Diag(OpLoc, diag::err_no_typeid_with_fno_rtti)); + } + QualType TypeInfoType = Context.getTypeDeclType(CXXTypeInfoDecl); if (isType) { |