Skip to content

Commit

Permalink
Fix warnings in #102848 [-Wunused-but-set-variable]
Browse files Browse the repository at this point in the history
  • Loading branch information
chapuni committed Aug 15, 2024
1 parent 12763a0 commit fa343be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clang/lib/AST/MicrosoftMangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2969,6 +2969,7 @@ void MicrosoftCXXNameMangler::mangleFunctionType(const FunctionType *T,
if (const auto *AT = ResultType->getContainedAutoType()) {
assert(AT->getKeyword() == AutoTypeKeyword::Auto &&
"should only need to mangle auto!");
(void)AT;
Out << '?';
mangleQualifiers(ResultType.getLocalQualifiers(), /*IsMember=*/false);
Out << '?';
Expand All @@ -2987,7 +2988,7 @@ void MicrosoftCXXNameMangler::mangleFunctionType(const FunctionType *T,
// SourceRange Range)` for details.
auto UseClangMangling = [](QualType ResultType) {
QualType T = ResultType;
while (const auto *PT = dyn_cast<PointerType>(T.getTypePtr())) {
while (isa<PointerType>(T.getTypePtr())) {
T = T->getPointeeType();
if (T.getQualifiers().hasAddressSpace())
return true;
Expand Down

0 comments on commit fa343be

Please sign in to comment.