Better source location for -Wignored-qualifiers on trailing return types
authorAaron Puchert <aaronpuchert@alice-dsl.net>
Wed, 28 Oct 2020 22:23:09 +0000 (23:23 +0100)
committerAaron Puchert <aaronpuchert@alice-dsl.net>
Wed, 28 Oct 2020 22:32:57 +0000 (23:32 +0100)
commit5dbccc6c89c0f6c6dc6277cc304057f6d50b298d
tree228794223f34ce102f4c6b8dc9258f1b01bcca04
parent51f8d46491c7efd4e2054b036c13ef6266fceab3
Better source location for -Wignored-qualifiers on trailing return types

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.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D90129
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