[PATCH] D142333: [clang][DebugInfo] Check TemplateArgument::IsDefaulted
Michael Buch via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 23 01:33:02 PST 2023
Michael137 created this revision.
Michael137 added reviewers: dblaikie, aprantl.
Herald added a project: All.
Michael137 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Since `ClassTemplateSpecializationDecl`s now set the
`TemplateArgument::IsDefaulted` bit, there's no need
to derive it here.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D142333
Files:
clang/lib/CodeGen/CGDebugInfo.cpp
Index: clang/lib/CodeGen/CGDebugInfo.cpp
===================================================================
--- clang/lib/CodeGen/CGDebugInfo.cpp
+++ clang/lib/CodeGen/CGDebugInfo.cpp
@@ -2010,15 +2010,10 @@
for (unsigned i = 0, e = Args.Args.size(); i != e; ++i) {
const TemplateArgument &TA = Args.Args[i];
StringRef Name;
- bool defaultParameter = false;
- if (Args.TList) {
+ bool defaultParameter = TA.getIsDefaulted();
+ if (Args.TList)
Name = Args.TList->getParam(i)->getName();
- NamedDecl const *ND = Args.TList->getParam(i);
- defaultParameter = clang::isSubstitutedDefaultArgument(
- CGM.getContext(), TA, ND, Args.Args, Args.TList->getDepth());
- }
-
switch (TA.getKind()) {
case TemplateArgument::Type: {
llvm::DIType *TTy = getOrCreateType(TA.getAsType(), Unit);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142333.491255.patch
Type: text/x-patch
Size: 851 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230123/8d2aff7a/attachment.bin>
More information about the cfe-commits
mailing list