[clang] Fix wrong -Wunused-local-typedef warning within a template function
authorKristina Bessonova <kbessonova@accesssoftek.com>
Mon, 21 Mar 2022 11:21:24 +0000 (13:21 +0200)
committerKristina Bessonova <kbessonova@accesssoftek.com>
Mon, 21 Mar 2022 11:21:25 +0000 (13:21 +0200)
commitafbe54f2feb0ed3a4d4c03c6107fcdffd21a8394
treef4007b7107fa126314a53951e75eeecf1041082d
parentfc354d375232c22bbc13b80e4e339d8925ae2c70
[clang] Fix wrong -Wunused-local-typedef warning within a template function

Partially fixes PR24883.

The patch sets Reference bit while instantiating a typedef if it
previously was found referenced.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D114382
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clang/test/AST/ast-dump-openmp-begin-declare-variant_reference.cpp
clang/test/Modules/odr_hash.cpp
clang/test/SemaCXX/warn-unused-local-typedef.cpp