Skip to content

Commit 41f26a3

Browse files
authored
Remove unused variables (#694)
1 parent 42b7e18 commit 41f26a3

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

lib/CppInterOp/Compatibility.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@ inline void codeComplete(std::vector<std::string>& Results,
354354
}
355355

356356
std::vector<std::string> results;
357-
std::vector<std::string> Comps;
358357
clang::CompilerInstance* MainCI = (*Interp)->getCompilerInstance();
359358
auto CC = clang::ReplCodeCompleter();
360359
CC.codeComplete(MainCI, code, complete_line, complete_column,

unittests/CppInterOp/FunctionReflectionTest.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ TEST(FunctionReflectionTest, GetFunctionRequiredArgs) {
562562
}
563563

564564
TEST(FunctionReflectionTest, GetFunctionArgType) {
565-
std::vector<Decl*> Decls, SubDecls;
565+
std::vector<Decl*> Decls;
566566
std::string code = R"(
567567
void f1(int i, double d, long l, char ch) {}
568568
void f2(const int i, double d[], long *l, char ch[4]) {}
@@ -582,7 +582,7 @@ TEST(FunctionReflectionTest, GetFunctionArgType) {
582582
}
583583

584584
TEST(FunctionReflectionTest, GetFunctionSignature) {
585-
std::vector<Decl*> Decls, SubDecls;
585+
std::vector<Decl*> Decls;
586586
std::string code = R"(
587587
class C {
588588
void f(int i, double d, long l = 0, char ch = 'a') {}
@@ -626,7 +626,8 @@ TEST(FunctionReflectionTest, GetFunctionSignature) {
626626
}
627627

628628
TEST(FunctionReflectionTest, IsTemplatedFunction) {
629-
std::vector<Decl*> Decls, SubDeclsC1, SubDeclsC2;
629+
std::vector<Decl*> Decls;
630+
std::vector<Decl*> SubDeclsC1;
630631
std::string code = R"(
631632
void f1(int a) {}
632633
@@ -1448,7 +1449,7 @@ TEST(FunctionReflectionTest, GetFunctionAddress) {
14481449
#ifdef _WIN32
14491450
GTEST_SKIP() << "Disabled on Windows. Needs fixing.";
14501451
#endif
1451-
std::vector<Decl*> Decls, SubDecls;
1452+
std::vector<Decl*> Decls;
14521453
std::string code = "int f1(int i) { return i * i; }";
14531454
std::vector<const char*> interpreter_args = {"-include", "new"};
14541455

@@ -2132,7 +2133,7 @@ TEST(FunctionReflectionTest, IsConstMethod) {
21322133
}
21332134

21342135
TEST(FunctionReflectionTest, GetFunctionArgName) {
2135-
std::vector<Decl*> Decls, SubDecls;
2136+
std::vector<Decl*> Decls;
21362137
std::string code = R"(
21372138
void f1(int i, double d, long l, char ch) {}
21382139
void f2(const int i, double d[], long *l, char ch[4]) {}
@@ -2172,7 +2173,7 @@ TEST(FunctionReflectionTest, GetFunctionArgName) {
21722173
}
21732174

21742175
TEST(FunctionReflectionTest, GetFunctionArgDefault) {
2175-
std::vector<Decl*> Decls, SubDecls;
2176+
std::vector<Decl*> Decls;
21762177
std::string code = R"(
21772178
void f1(int i, double d = 4.0, const char *s = "default", char ch = 'c') {}
21782179
void f2(float i = 0.0, double d = 3.123, long m = 34126) {}

unittests/CppInterOp/ScopeReflectionTest.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ TEST(ScopeReflectionTest, IsBuiltin) {
191191
EXPECT_TRUE(Cpp::IsBuiltin(C.getComplexType(C.Float128Ty).getAsOpaquePtr()));
192192

193193
// std::complex
194-
std::vector<Decl*> Decls;
195194
Interp->declare("#include <complex>");
196195
Sema &S = Interp->getCI()->getSema();
197196
auto lookup = S.getStdNamespace()->lookup(&C.Idents.get("complex"));

unittests/CppInterOp/VariableReflectionTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ TEST(VariableReflectionTest, IsConstVariable) {
534534
}
535535

536536
TEST(VariableReflectionTest, DISABLED_GetArrayDimensions) {
537-
std::vector<Decl *> Decls, SubDecls;
537+
std::vector<Decl *> Decls;
538538
std::string code = R"(
539539
int a;
540540
int b[1];

0 commit comments

Comments
 (0)