[clang] [Clang][Sema] Fix warnings after #84050 (PR #90104)

via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 25 12:04:53 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Krystian Stasiowski (sdkrystian)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/90104.diff


2 Files Affected:

- (modified) clang/lib/Sema/SemaExprMember.cpp (-1) 
- (modified) clang/lib/Sema/SemaLookup.cpp (+1-1) 


``````````diff
diff --git a/clang/lib/Sema/SemaExprMember.cpp b/clang/lib/Sema/SemaExprMember.cpp
index 0eeb7b1faa0a22..14dde1bff8fbc6 100644
--- a/clang/lib/Sema/SemaExprMember.cpp
+++ b/clang/lib/Sema/SemaExprMember.cpp
@@ -1793,7 +1793,6 @@ ExprResult Sema::ActOnMemberAccessExpr(Scope *S, Expr *Base,
   DecomposeUnqualifiedId(Id, TemplateArgsBuffer,
                          NameInfo, TemplateArgs);
 
-  DeclarationName Name = NameInfo.getName();
   bool IsArrow = (OpKind == tok::arrow);
 
   if (getLangOpts().HLSL && IsArrow)
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index a537eccc2ebaf0..2f6ad49fc08b61 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -2791,7 +2791,7 @@ bool Sema::LookupParsedName(LookupResult &R, Scope *S, CXXScopeSpec *SS,
       return LookupInSuper(R, NNS->getAsRecordDecl());
     // This nested-name-specifier occurs after another nested-name-specifier,
     // so long into the context associated with the prior nested-name-specifier.
-    if (DC = computeDeclContext(*SS, EnteringContext)) {
+    if ((DC = computeDeclContext(*SS, EnteringContext))) {
       // The declaration context must be complete.
       if (!DC->isDependentContext() && RequireCompleteDeclContext(*SS, DC))
         return false;

``````````

</details>


https://github.com/llvm/llvm-project/pull/90104


More information about the cfe-commits mailing list