[all-commits] [llvm/llvm-project] 82bb57: [AST][RecoveryExpr] Make DeduceAutoType fail if th...
Haojian Wu via All-commits
all-commits at lists.llvm.org
Fri May 29 01:02:28 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 82bb57c11d8ccb4e1b0f420f4388dd6553bbc57a
https://github.com/llvm/llvm-project/commit/82bb57c11d8ccb4e1b0f420f4388dd6553bbc57a
Author: Haojian Wu <hokein.wu at gmail.com>
Date: 2020-05-29 (Fri, 29 May 2020)
Changed paths:
M clang/lib/Sema/SemaStmt.cpp
M clang/lib/Sema/SemaTemplateDeduction.cpp
A clang/test/AST/ast-dump-invalid-auto-return-funcs.cpp
M clang/test/AST/ast-dump-recovery.cpp
M clang/test/Sema/invalid-bitwidth-expr.mm
Log Message:
-----------
[AST][RecoveryExpr] Make DeduceAutoType fail if the auto is deduced from recovery exprs.
Summary:
With recovery-ast, we will get an undeduced `auto` return type for
"auto foo()->undef()" function declaration, the function decl still keeps
valid, it is dangerous, and breaks assumptions in clang, and leads crashes.
This patch invalidates these functions, if we deduce autos from the
return rexpression, which is similar to auto VarDecl.
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80221
More information about the All-commits
mailing list