summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LoopInfo.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-03-11 02:35:37 +0000
committerEric Fiselier <eric@efcs.ca>2017-03-11 02:35:37 +0000
commitcac0a5971879533625fed92f6c7a9ff3c675cf55 (patch)
treebe512ab1006ed64f9d24996fc1c5578d47b05579 /llvm/lib/Analysis/LoopInfo.cpp
parent81d1744519129755e64cc9f262249f89fda81e85 (diff)
downloadbcm5719-llvm-cac0a5971879533625fed92f6c7a9ff3c675cf55.tar.gz
bcm5719-llvm-cac0a5971879533625fed92f6c7a9ff3c675cf55.zip
[coroutines] Fix diagnostics depending on the first coroutine statement.
Summary: Some coroutine diagnostics need to point to the location of the first coroutine keyword in the function, like when diagnosing a `return` inside a coroutine. Previously we did this by storing each *valid* coroutine statement in a list and select the first one to use in diagnostics. However if every coroutine statement is invalid we would have no location to point to. This patch fixes the storage of the first coroutine statement location, ensuring that it gets stored even when the resulting AST node would be invalid. This patch also removes the `CoroutineStmts` list in `FunctionScopeInfo` because it was unused. Reviewers: rsmith, GorNishanov, aaron.ballman Reviewed By: GorNishanov Subscribers: mehdi_amini, cfe-commits Differential Revision: https://reviews.llvm.org/D30776 llvm-svn: 297547
Diffstat (limited to 'llvm/lib/Analysis/LoopInfo.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud