Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 50cd0d9

Browse files
committed
remove a bunch of unused private methods
found with a smarter version of -Wunused-member-function that I'm playwing with. Appologies in advance if I removed someone's WIP code. ARCMigrate/TransProperties.cpp | 8 ----- AST/MicrosoftMangle.cpp | 1 Analysis/AnalysisDeclContext.cpp | 5 --- Analysis/LiveVariables.cpp | 14 ---------- Index/USRGeneration.cpp | 10 ------- Sema/Sema.cpp | 33 +++++++++++++++++++++--- Sema/SemaChecking.cpp | 3 -- Sema/SemaDecl.cpp | 20 ++------------ StaticAnalyzer/Checkers/GenericTaintChecker.cpp | 1 9 files changed, 34 insertions(+), 61 deletions(-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204561 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent f5c211a commit 50cd0d9

File tree

7 files changed

+0
-42
lines changed

7 files changed

+0
-42
lines changed

Diff for: lib/ARCMigrate/TransProperties.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -347,14 +347,6 @@ class PropertiesRewriter {
347347
return false;
348348
}
349349

350-
bool hasAllIvarsBacked(PropsTy &props) const {
351-
for (PropsTy::iterator I = props.begin(), E = props.end(); I != E; ++I)
352-
if (!isUserDeclared(I->IvarD))
353-
return false;
354-
355-
return true;
356-
}
357-
358350
// \brief Returns true if all declarations in the @property have GC __weak.
359351
bool hasGCWeak(PropsTy &props, SourceLocation atLoc) const {
360352
if (!Pass.isGCMigration())

Diff for: lib/AST/MicrosoftMangle.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ class MicrosoftCXXNameMangler {
208208

209209
void mangle(const NamedDecl *D, StringRef Prefix = "\01?");
210210
void mangleName(const NamedDecl *ND);
211-
void mangleDeclaration(const NamedDecl *ND);
212211
void mangleFunctionEncoding(const FunctionDecl *FD);
213212
void mangleVariableEncoding(const VarDecl *VD);
214213
void mangleMemberDataPointer(const CXXRecordDecl *RD, const ValueDecl *VD);

Diff for: lib/Analysis/AnalysisDeclContext.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -458,11 +458,6 @@ class FindBlockDeclRefExprsVals : public StmtVisitor<FindBlockDeclRefExprsVals>{
458458
BumpVectorContext &bc)
459459
: BEVals(bevals), BC(bc) {}
460460

461-
bool IsTrackedDecl(const VarDecl *VD) {
462-
const DeclContext *DC = VD->getDeclContext();
463-
return IgnoredContexts.count(DC) == 0;
464-
}
465-
466461
void VisitStmt(Stmt *S) {
467462
for (Stmt::child_range I = S->children(); I; ++I)
468463
if (Stmt *child = *I)

Diff for: lib/Analysis/LiveVariables.cpp

-14
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ class DataflowWorklist {
3737
POV(Ctx.getAnalysis<PostOrderCFGView>()) {}
3838

3939
void enqueueBlock(const CFGBlock *block);
40-
void enqueueSuccessors(const CFGBlock *block);
4140
void enqueuePredecessors(const CFGBlock *block);
4241

4342
const CFGBlock *dequeue();
@@ -53,19 +52,6 @@ void DataflowWorklist::enqueueBlock(const clang::CFGBlock *block) {
5352
worklist.push_back(block);
5453
}
5554
}
56-
57-
void DataflowWorklist::enqueueSuccessors(const clang::CFGBlock *block) {
58-
const unsigned OldWorklistSize = worklist.size();
59-
for (CFGBlock::const_succ_iterator I = block->succ_begin(),
60-
E = block->succ_end(); I != E; ++I) {
61-
enqueueBlock(*I);
62-
}
63-
64-
if (OldWorklistSize == 0 || OldWorklistSize == worklist.size())
65-
return;
66-
67-
sortWorklist();
68-
}
6955

7056
void DataflowWorklist::enqueuePredecessors(const clang::CFGBlock *block) {
7157
const unsigned OldWorklistSize = worklist.size();

Diff for: lib/Index/USRGeneration.cpp

-10
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,6 @@ class USRGenerator : public ConstDeclVisitor<USRGenerator> {
105105
void GenObjCCategory(StringRef cls, StringRef cat) {
106106
generateUSRForObjCCategory(cls, cat, Out);
107107
}
108-
/// Generate a USR fragment for an Objective-C instance variable. The
109-
/// complete USR can be created by concatenating the USR for the
110-
/// encompassing class with this USR fragment.
111-
void GenObjCIvar(StringRef ivar) {
112-
generateUSRForObjCIvar(ivar, Out);
113-
}
114-
/// Generate a USR fragment for an Objective-C method.
115-
void GenObjCMethod(StringRef sel, bool isInstanceMethod) {
116-
generateUSRForObjCMethod(sel, isInstanceMethod, Out);
117-
}
118108
/// Generate a USR fragment for an Objective-C property.
119109
void GenObjCProperty(StringRef prop) {
120110
generateUSRForObjCProperty(prop, Out);

Diff for: lib/Sema/SemaChecking.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -2426,9 +2426,6 @@ class CheckFormatHandler : public analyze_format_string::FormatStringHandler {
24262426
void EmitFormatDiagnostic(PartialDiagnostic PDiag, SourceLocation StringLoc,
24272427
bool IsStringLocation, Range StringRange,
24282428
ArrayRef<FixItHint> Fixit = None);
2429-
2430-
void CheckPositionalAndNonpositionalArgs(
2431-
const analyze_format_string::FormatSpecifier *FS);
24322429
};
24332430
}
24342431

Diff for: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class GenericTaintChecker : public Checker< check::PostStmt<CallExpr>,
3434
static void *getTag() { static int Tag; return &Tag; }
3535

3636
void checkPostStmt(const CallExpr *CE, CheckerContext &C) const;
37-
void checkPostStmt(const DeclRefExpr *DRE, CheckerContext &C) const;
3837

3938
void checkPreStmt(const CallExpr *CE, CheckerContext &C) const;
4039

0 commit comments

Comments
 (0)