diff options
author | Haojian Wu <hokein.wu@gmail.com> | 2020-04-23 11:14:01 +0200 |
---|---|---|
committer | Haojian Wu <hokein.wu@gmail.com> | 2020-06-12 15:21:38 +0200 |
commit | 58ea1059df97c71c023ec9de3940040c2c9bbc64 (patch) | |
tree | 4176c4356af1a29c6bc73cafc13ddce89ebbe44c /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 613c4a87ba9bb39d1927402f4dd4c1ef1f9a02f7 (diff) | |
download | llvm-58ea1059df97c71c023ec9de3940040c2c9bbc64.zip llvm-58ea1059df97c71c023ec9de3940040c2c9bbc64.tar.gz llvm-58ea1059df97c71c023ec9de3940040c2c9bbc64.tar.bz2 |
[AST][RecoveryExpr] Build recovery expressions by default for C++.
Reland https://reviews.llvm.org/D76696
All known crashes have been fixed, another attemption.
We have rolled out this to all internal users for a while, didn't see
big issues, we consider it is stable enough.
Reviewed By: sammccall
Subscribers: rsmith, hubert.reinterpretcast, ebevhan, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D78350
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 3aea916..c718077 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -2885,10 +2885,11 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, !Args.hasArg(OPT_fno_concept_satisfaction_caching); if (Args.hasArg(OPT_fconcepts_ts)) Diags.Report(diag::warn_fe_concepts_ts_flag); + // Recovery AST still heavily relies on dependent-type machinery. Opts.RecoveryAST = - Args.hasFlag(OPT_frecovery_ast, OPT_fno_recovery_ast, false); + Args.hasFlag(OPT_frecovery_ast, OPT_fno_recovery_ast, Opts.CPlusPlus); Opts.RecoveryASTType = -+ Args.hasFlag(OPT_frecovery_ast_type, OPT_fno_recovery_ast_type, false); + Args.hasFlag(OPT_frecovery_ast_type, OPT_fno_recovery_ast_type, false); Opts.HeinousExtensions = Args.hasArg(OPT_fheinous_gnu_extensions); Opts.AccessControl = !Args.hasArg(OPT_fno_access_control); Opts.ElideConstructors = !Args.hasArg(OPT_fno_elide_constructors); |