[PATCH] D33532: [coroutines] Fix fallthrough diagnostics for coroutines
Eric Fiselier via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 24 18:34:22 PDT 2017
EricWF created this revision.
This patch fixes a number of issues with the analysis warnings emitted when a coroutine may reach the end of the function w/o returning.
- Fix bug where coroutines with `return_value` are incorrectly diagnosed as missing `co_return`'s.
- Rework diagnostic message to no longer say "non-void coroutine", because that implies the coroutine doesn't have a void return type, which it might. In this case a non-void coroutine is one who's promise type does not contain `return_void()`
https://reviews.llvm.org/D33532
Files:
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/ScopeInfo.h
lib/Analysis/AnalysisDeclContext.cpp
lib/Sema/AnalysisBasedWarnings.cpp
lib/Sema/SemaCoroutine.cpp
lib/Sema/SemaDecl.cpp
test/SemaCXX/coreturn.cpp
test/SemaCXX/coroutines.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33532.100193.patch
Type: text/x-patch
Size: 11454 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170525/4499cdbc/attachment-0001.bin>
More information about the cfe-commits
mailing list