[clang] 07ee870 - [AST] Fix a warning

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 5 09:16:10 PST 2024


Author: Kazu Hirata
Date: 2024-11-05T09:16:04-08:00
New Revision: 07ee870c9ae44b7dd90548e1706118d1d9f816b2

URL: https://github.com/llvm/llvm-project/commit/07ee870c9ae44b7dd90548e1706118d1d9f816b2
DIFF: https://github.com/llvm/llvm-project/commit/07ee870c9ae44b7dd90548e1706118d1d9f816b2.diff

LOG: [AST] Fix a warning

This patch fixes:

  clang/lib/AST/ASTContext.cpp:14432:8: error: unused variable 'IT'
  [-Werror,-Wunused-variable]

Added: 
    

Modified: 
    clang/lib/AST/ASTContext.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 061a6866fb5fb1..91a7d4bb5a89dd 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -14433,6 +14433,7 @@ void ASTContext::registerSYCLEntryPointFunction(FunctionDecl *FD) {
   assert((IT == SYCLKernels.end() ||
           declaresSameEntity(FD, IT->second.getKernelEntryPointDecl())) &&
          "SYCL kernel name conflict");
+  (void)IT;
   SYCLKernels.insert(
       std::make_pair(KernelNameType, BuildSYCLKernelInfo(KernelNameType, FD)));
 }


        


More information about the cfe-commits mailing list