]> granicus.if.org Git - clang/commit
[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)
commitd80516ddef8d4010f79cad378d8716676aa74ebd
tree64ed9e23f3377c546d4ec85bee8bb1b3dbb60333
parent3d972ea0aa9215851d4ad7461472cb98a53a1ecc
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@360224 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaStmt.cpp
test/SemaCXX/typo-correction-crash.cpp