diff options
| author | Michael Buch <michaelbuch12@gmail.com> | 2023-01-25 17:09:06 +0000 |
|---|---|---|
| committer | Michael Buch <michaelbuch12@gmail.com> | 2023-01-27 02:24:32 +0000 |
| commit | 798494ed4f112bf64dcabbe8b60becb42b23208f (patch) | |
| tree | 51be682c1979dc8a853754121e902244d5189013 /llvm/lib/CodeGen/StackProtector.cpp | |
| parent | dd9b31e2c2a271c9e6059dde6a406aea5ed8b663 (diff) | |
| download | llvm-798494ed4f112bf64dcabbe8b60becb42b23208f.zip llvm-798494ed4f112bf64dcabbe8b60becb42b23208f.tar.gz llvm-798494ed4f112bf64dcabbe8b60becb42b23208f.tar.bz2 | |
[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
Diffstat (limited to 'llvm/lib/CodeGen/StackProtector.cpp')
0 files changed, 0 insertions, 0 deletions
