[clang] 2565887 - [clang][test] Remove unused variable 'SM' (NFC)

Jie Fu via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 20 17:00:11 PDT 2023


Author: Jie Fu
Date: 2023-07-21T07:59:30+08:00
New Revision: 25658879a022ca9a8d91ed214701bfd724d159a8

URL: https://github.com/llvm/llvm-project/commit/25658879a022ca9a8d91ed214701bfd724d159a8
DIFF: https://github.com/llvm/llvm-project/commit/25658879a022ca9a8d91ed214701bfd724d159a8.diff

LOG: [clang][test] Remove unused variable 'SM' (NFC)

/data/llvm-project/clang/unittests/AST/DeclTest.cpp:153:18: error: unused variable 'SM' [-Werror,-Wunused-variable]
  SourceManager &SM = Ctx.getSourceManager();
                 ^
1 error generated.

Added: 
    

Modified: 
    clang/unittests/AST/DeclTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/AST/DeclTest.cpp b/clang/unittests/AST/DeclTest.cpp
index 54a1f2c5843548..2ed2ed750941c4 100644
--- a/clang/unittests/AST/DeclTest.cpp
+++ b/clang/unittests/AST/DeclTest.cpp
@@ -150,7 +150,6 @@ TEST(Decl, ConceptDecl) {
 
   auto AST = tooling::buildASTFromCodeWithArgs(Code, {"-std=c++20"});
   ASTContext &Ctx = AST->getASTContext();
-  SourceManager &SM = Ctx.getSourceManager();
 
   const auto *Decl =
       selectFirst<ConceptDecl>("decl", match(conceptDecl().bind("decl"), Ctx));


        


More information about the cfe-commits mailing list