[clang][TypePrinter] Support expression template arguments when checking defaultedness
This patch adds support for `TemplateArgument`s of kind `TemplateArgument::Expression` to `clang::isSubstitutedDefaultArgument`. We do so by evaluating both the `Pattern` and `Arg` expression to an `APInt`, if we can, and comparing the results. This will be useful in an upcoming change where `clang::isSubstitutedDefaultArgument` gets called from `clang::Sema` where the `TemplateArgument`s are instantiated as expressions (without being evaluted to `APInt` beforehand). **Testing** - Added unit-tests Differential Revision: https://reviews.llvm.org/D142632
Loading
Please sign in to comment