diff options
author | Haojian Wu <hokein.wu@gmail.com> | 2022-01-19 13:55:07 +0100 |
---|---|---|
committer | Haojian Wu <hokein.wu@gmail.com> | 2022-01-19 14:18:38 +0100 |
commit | 6c78703e3abcd9c76aefbf066869fe6a32d59516 (patch) | |
tree | c4a883ade490ef80198b19891b3c2cc9b478e8ba /clang/lib/Parse/ParseDecl.cpp | |
parent | 73cc8dd2d7d342de71063066b254b9c90c4f31ef (diff) | |
download | llvm-6c78703e3abcd9c76aefbf066869fe6a32d59516.zip llvm-6c78703e3abcd9c76aefbf066869fe6a32d59516.tar.gz llvm-6c78703e3abcd9c76aefbf066869fe6a32d59516.tar.bz2 |
[AST] Fix the incorrect auto-keyword loc for constrained auto type loc.
E.g. `Concept auto Func();`
The nameLoc for the constained auto type loc pointed to the concept name
loc, it should be the auto token loc. This patch fixes it, and remove
a relevant hack in clang-tidy check.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D117009
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index cff8c76..f21938c 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -3582,7 +3582,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, isInvalid = DS.SetTypeSpecType(TST_decltype_auto, Loc, PrevSpec, DiagID, TemplateId, Policy); } else { - isInvalid = DS.SetTypeSpecType(TST_auto, Loc, PrevSpec, DiagID, + isInvalid = DS.SetTypeSpecType(TST_auto, AutoLoc, PrevSpec, DiagID, TemplateId, Policy); } break; |