[Sema] Correct typos in return statements so the return types of 'auto' functions...
authorSam McCall <sam.mccall@gmail.com>
Wed, 8 May 2019 05:49:42 +0000 (05:49 +0000)
committerSam McCall <sam.mccall@gmail.com>
Wed, 8 May 2019 05:49:42 +0000 (05:49 +0000)
commit835d67f6c7e78dd730d9ab7e55af23612d644067
tree49bd0d76b1c4f8a7dd656d6227db47189e93b9af
parent0a753938db3b2db756b6c535c2127d4efaaa0b40
[Sema] Correct typos in return statements so the return types of 'auto' functions are always deduced.

Summary:
e.g.
  auto foo() {
    return no_such_thing; // Return value is a TypoExpr
  }
  using T = decltype(foo()); // Uh-oh, undeduced auto.

Reviewers: rsmith

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D61649

llvm-svn: 360224
clang/lib/Sema/SemaStmt.cpp
clang/test/SemaCXX/typo-correction-crash.cpp