We collect the source location of a trailing return type in the parser,
improving the location for regular functions and providing a location
for lambdas, where previously there was none.
Fixes PR47732.
Paths
| Differential D90129
Better source location for -Wignored-qualifiers on trailing return types ClosedPublic Authored by aaronpuchert on Oct 25 2020, 6:44 PM.
Details Summary We collect the source location of a trailing return type in the parser, Fixes PR47732.
Diff Detail
Unit TestsFailed
Event Timelineaaronpuchert added inline comments.
aaronpuchert marked an inline comment as done. Comment ActionsCollect location of a trailing return type in the parser, use that for the warning. I resisted clang-format's urge to reflow the large parameter lists, I hope that's the right thing here. aaronpuchert retitled this revision from Source location for -Wignored-qualifiers on lambda trailing return type to Better source location for -Wignored-qualifiers on trailing return types.Oct 27 2020, 6:38 PM Comment Actions LGTM aside from a question about a potential assert to add.
This revision is now accepted and ready to land.Oct 28 2020, 5:52 AM aaronpuchert added inline comments.
This revision was landed with ongoing or failed builds.Oct 28 2020, 3:33 PM Closed by commit rG5dbccc6c89c0: Better source location for -Wignored-qualifiers on trailing return types (authored by aaronpuchert). · Explain Why This revision was automatically updated to reflect the committed changes. aaronpuchert marked an inline comment as done. Comment Actions Added the assertions in a follow-up change rGebfc427bbe08f0c36af9721d5a4e6d3ffe2e4bf5.
Revision Contents
Diff 301161 clang/include/clang/Sema/DeclSpec.h
clang/lib/Parse/ParseDecl.cpp
clang/lib/Parse/ParseDeclCXX.cpp
clang/lib/Parse/ParseExprCXX.cpp
clang/lib/Sema/DeclSpec.cpp
clang/lib/Sema/SemaType.cpp
clang/test/SemaCXX/return.cpp
|
clang-format suggested style edits found: