[PATCH] D116414: [AST] Produce ReturnStmt containing RecoveryExpr when type is wrong

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 30 08:31:31 PST 2021


sammccall created this revision.
sammccall added a reviewer: hokein.
sammccall requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Previously we just drop the ReturnStmt and its argument from the AST,
which blocks analysis of broken code.

Fixes https://github.com/llvm/llvm-project/issues/39944


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116414

Files:
  clang/include/clang/Sema/Sema.h
  clang/lib/Sema/SemaStmt.cpp
  clang/test/AST/ast-dump-recovery.cpp
  clang/test/SemaCXX/constant-expression-cxx11.cpp
  clang/test/SemaCXX/constant-expression-cxx14.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116414.396678.patch
Type: text/x-patch
Size: 9120 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211230/6f9c6fea/attachment.bin>


More information about the cfe-commits mailing list