[clang][TypePrinter] Teach isSubstitutedDefaultArgument about integral types
authorMichael Buch <michaelbuch12@gmail.com>
Tue, 13 Dec 2022 14:30:17 +0000 (14:30 +0000)
committerMichael Buch <michaelbuch12@gmail.com>
Fri, 16 Dec 2022 11:38:51 +0000 (11:38 +0000)
commit1706f34d604ec304af58a7b95dbc127bd77e17fa
treeaac745ea59bd833bd618b1f2929357c62cc69d65
parent98afcbab66505661045dccb85ee9acdbf9410047
[clang][TypePrinter] Teach isSubstitutedDefaultArgument about integral types

This patch handles default integral non-type template parameters.

After this patch the clang TypePrinter will omit default integral
template arguments when the `PrintingPolicy::SuppressDefaultTemplateArgs`
option is specified and sets us up to be able to re-use
`clang::isSubstitutedDefaultArgument` from the DWARF CodeGen
component.

Differential Revision: https://reviews.llvm.org/D139986
13 files changed:
clang/lib/AST/TypePrinter.cpp
clang/test/CXX/temp/temp.arg/temp.arg.template/p3-0x.cpp
clang/test/CodeGenObjCXX/encode.mm
clang/test/Misc/diag-template-diffing.cpp
clang/test/Misc/diag-template.cpp
clang/test/SemaCUDA/device-use-host-var.cu
clang/test/SemaCXX/co_await-range-for-exp-namespace.cpp
clang/test/SemaCXX/co_await-range-for.cpp
clang/test/SemaCXX/coroutines-exp-namespace.cpp
clang/test/SemaCXX/coroutines.cpp
clang/test/SemaCXX/cxx11-call-to-deleted-constructor.cpp
clang/test/SemaTemplate/deduction-guide.cpp
clang/test/SemaTemplate/dependent-names.cpp