Skip to content

Commit fcbfc99

Browse files
authored
Merge pull request #454 from secure-software-engineering/f-ClangTidyFixIfdsFSTaint
clang-tidy: Fix Ifds fs taint
2 parents 1308770 + b22ae9a commit fcbfc99

43 files changed

Lines changed: 297 additions & 284 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/BranchSwitchInstFlowFunction.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ namespace psr {
1111

1212
class BranchSwitchInstFlowFunction : public FlowFunctionBase {
1313
public:
14-
BranchSwitchInstFlowFunction(const llvm::Instruction *_currentInst,
15-
TraceStats &_traceStats,
16-
ExtendedValue _zeroValue)
17-
: FlowFunctionBase(_currentInst, _traceStats, _zeroValue) {}
14+
BranchSwitchInstFlowFunction(const llvm::Instruction *CurrentInst,
15+
TraceStats &TStats,
16+
const ExtendedValue &ZeroValue)
17+
: FlowFunctionBase(CurrentInst, TStats, ZeroValue) {}
1818
~BranchSwitchInstFlowFunction() override = default;
1919

20-
std::set<ExtendedValue> computeTargetsExt(ExtendedValue &fact) override;
20+
std::set<ExtendedValue> computeTargetsExt(ExtendedValue &Fact) override;
2121
};
2222

2323
} // namespace psr

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/CallToRetFlowFunction.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ namespace psr {
1111

1212
class CallToRetFlowFunction : public FlowFunctionBase {
1313
public:
14-
CallToRetFlowFunction(const llvm::Instruction *_currentInst,
15-
TraceStats &_traceStats, ExtendedValue _zeroValue)
16-
: FlowFunctionBase(_currentInst, _traceStats, _zeroValue) {}
14+
CallToRetFlowFunction(const llvm::Instruction *CurrentInst,
15+
TraceStats &TStats, const ExtendedValue &ZeroValue)
16+
: FlowFunctionBase(CurrentInst, TStats, ZeroValue) {}
1717
~CallToRetFlowFunction() override = default;
1818

19-
std::set<ExtendedValue> computeTargetsExt(ExtendedValue &fact) override;
19+
std::set<ExtendedValue> computeTargetsExt(ExtendedValue &Fact) override;
2020
};
2121

2222
} // namespace psr

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/CheckOperandsFlowFunction.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ namespace psr {
1111

1212
class CheckOperandsFlowFunction : public FlowFunctionBase {
1313
public:
14-
CheckOperandsFlowFunction(const llvm::Instruction *_currentInst,
15-
TraceStats &_traceStats, ExtendedValue _zeroValue)
16-
: FlowFunctionBase(_currentInst, _traceStats, _zeroValue) {}
14+
CheckOperandsFlowFunction(const llvm::Instruction *CurrentInst,
15+
TraceStats &TStats, const ExtendedValue &ZeroValue)
16+
: FlowFunctionBase(CurrentInst, TStats, ZeroValue) {}
1717
~CheckOperandsFlowFunction() override = default;
1818

19-
std::set<ExtendedValue> computeTargetsExt(ExtendedValue &fact) override;
19+
std::set<ExtendedValue> computeTargetsExt(ExtendedValue &Fact) override;
2020
};
2121

2222
} // namespace psr

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/FlowFunctionBase.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,18 @@ namespace psr {
2020

2121
class FlowFunctionBase : public FlowFunction<ExtendedValue> {
2222
public:
23-
FlowFunctionBase(const llvm::Instruction *_currentInst,
24-
TraceStats &_traceStats, ExtendedValue _zeroValue)
25-
: currentInst(_currentInst), traceStats(_traceStats),
26-
zeroValue(_zeroValue) {}
23+
FlowFunctionBase(const llvm::Instruction *CurrentInst, TraceStats &TStats,
24+
const ExtendedValue &ZeroValue)
25+
: CurrentInst(CurrentInst), TStats(TStats), ZeroValue(ZeroValue) {}
2726
~FlowFunctionBase() override = default;
2827

29-
std::set<ExtendedValue> computeTargets(ExtendedValue fact) override;
30-
virtual std::set<ExtendedValue> computeTargetsExt(ExtendedValue &fact) = 0;
28+
std::set<ExtendedValue> computeTargets(ExtendedValue Fact) override;
29+
virtual std::set<ExtendedValue> computeTargetsExt(ExtendedValue &Fact) = 0;
3130

3231
protected:
33-
const llvm::Instruction *currentInst;
34-
TraceStats &traceStats;
35-
ExtendedValue zeroValue;
32+
const llvm::Instruction *CurrentInst;
33+
TraceStats &TStats;
34+
ExtendedValue ZeroValue;
3635
};
3736

3837
} // namespace psr

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/GEPInstFlowFunction.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ namespace psr {
1111

1212
class GEPInstFlowFunction : public FlowFunctionBase {
1313
public:
14-
GEPInstFlowFunction(const llvm::Instruction *_currentInst,
15-
TraceStats &_traceStats, ExtendedValue _zeroValue)
16-
: FlowFunctionBase(_currentInst, _traceStats, _zeroValue) {}
14+
GEPInstFlowFunction(const llvm::Instruction *CurrentInst, TraceStats &TStats,
15+
const ExtendedValue &ZeroValue)
16+
: FlowFunctionBase(CurrentInst, TStats, ZeroValue) {}
1717
~GEPInstFlowFunction() override = default;
1818

19-
std::set<ExtendedValue> computeTargetsExt(ExtendedValue &fact) override;
19+
std::set<ExtendedValue> computeTargetsExt(ExtendedValue &Fact) override;
2020
};
2121

2222
} // namespace psr

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/GenerateFlowFunction.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ namespace psr {
1111

1212
class GenerateFlowFunction : public FlowFunctionBase {
1313
public:
14-
GenerateFlowFunction(const llvm::Instruction *_currentInst,
15-
TraceStats &_traceStats, ExtendedValue _zeroValue)
16-
: FlowFunctionBase(_currentInst, _traceStats, _zeroValue) {}
14+
GenerateFlowFunction(const llvm::Instruction *CurrentInst,
15+
TraceStats &TraceStats, const ExtendedValue &ZV)
16+
: FlowFunctionBase(CurrentInst, TraceStats, ZV) {}
1717
~GenerateFlowFunction() override = default;
1818

19-
std::set<ExtendedValue> computeTargetsExt(ExtendedValue &fact) override;
19+
std::set<ExtendedValue> computeTargetsExt(ExtendedValue &Fact) override;
2020
};
2121

2222
} // namespace psr

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/IdentityFlowFunction.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ namespace psr {
1111

1212
class IdentityFlowFunction : public FlowFunctionBase {
1313
public:
14-
IdentityFlowFunction(const llvm::Instruction *_currentInst,
15-
TraceStats &_traceStats, ExtendedValue _zeroValue)
16-
: FlowFunctionBase(_currentInst, _traceStats, _zeroValue) {}
14+
IdentityFlowFunction(const llvm::Instruction *CurrentInst,
15+
TraceStats &TraceStats, const ExtendedValue &ZV)
16+
: FlowFunctionBase(CurrentInst, TraceStats, ZV) {}
1717
~IdentityFlowFunction() override = default;
1818

19-
std::set<ExtendedValue> computeTargetsExt(ExtendedValue &fact) override;
19+
std::set<ExtendedValue> computeTargetsExt(ExtendedValue &Fact) override;
2020
};
2121

2222
} // namespace psr

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCallee.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ namespace psr {
1818

1919
class MapTaintedValuesToCallee : public FlowFunction<ExtendedValue> {
2020
public:
21-
MapTaintedValuesToCallee(const llvm::CallInst *_callInst,
22-
const llvm::Function *_destFun,
23-
TraceStats &_traceStats, ExtendedValue _zeroValue)
24-
: callInst(_callInst), destFun(_destFun), traceStats(_traceStats),
25-
zeroValue(_zeroValue) {}
21+
MapTaintedValuesToCallee(const llvm::CallInst *CallInst,
22+
const llvm::Function *DestFun, TraceStats &TStats,
23+
const ExtendedValue &ZeroValue)
24+
: CallInst(CallInst), DestFun(DestFun), TStats(TStats),
25+
ZeroValue(ZeroValue) {}
2626
~MapTaintedValuesToCallee() override = default;
2727

28-
std::set<ExtendedValue> computeTargets(ExtendedValue fact) override;
28+
std::set<ExtendedValue> computeTargets(ExtendedValue Fact) override;
2929

3030
private:
31-
const llvm::CallInst *callInst;
32-
const llvm::Function *destFun;
33-
TraceStats &traceStats;
34-
ExtendedValue zeroValue;
31+
const llvm::CallInst *CallInst;
32+
const llvm::Function *DestFun;
33+
TraceStats &TStats;
34+
ExtendedValue ZeroValue;
3535
};
3636

3737
} // namespace psr

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MapTaintedValuesToCaller.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,19 @@ namespace psr {
1717

1818
class MapTaintedValuesToCaller : public FlowFunction<ExtendedValue> {
1919
public:
20-
MapTaintedValuesToCaller(const llvm::CallInst *_callInst,
21-
const llvm::ReturnInst *_retInst,
22-
TraceStats &_traceStats, ExtendedValue _zeroValue)
23-
: callInst(_callInst), retInst(_retInst), traceStats(_traceStats),
24-
zeroValue(_zeroValue) {}
20+
MapTaintedValuesToCaller(const llvm::CallInst *CallInst,
21+
const llvm::ReturnInst *RetInst,
22+
TraceStats &TraceStats, const ExtendedValue &ZV)
23+
: CallInst(CallInst), RetInst(RetInst), TraceStats(TraceStats), ZV(ZV) {}
2524
~MapTaintedValuesToCaller() override = default;
2625

27-
std::set<ExtendedValue> computeTargets(ExtendedValue fact) override;
26+
std::set<ExtendedValue> computeTargets(ExtendedValue Fact) override;
2827

2928
private:
30-
const llvm::CallInst *callInst;
31-
const llvm::ReturnInst *retInst;
32-
TraceStats &traceStats;
33-
ExtendedValue zeroValue;
29+
const llvm::CallInst *CallInst;
30+
const llvm::ReturnInst *RetInst;
31+
TraceStats &TraceStats;
32+
ExtendedValue ZV;
3433
};
3534

3635
} // namespace psr

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/FlowFunctions/MemSetInstFlowFunction.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ namespace psr {
1111

1212
class MemSetInstFlowFunction : public FlowFunctionBase {
1313
public:
14-
MemSetInstFlowFunction(const llvm::Instruction *_currentInst,
15-
TraceStats &_traceStats, ExtendedValue _zeroValue)
16-
: FlowFunctionBase(_currentInst, _traceStats, _zeroValue) {}
14+
MemSetInstFlowFunction(const llvm::Instruction *CurrentInst,
15+
TraceStats &TraceStats, const ExtendedValue &ZV)
16+
: FlowFunctionBase(CurrentInst, TraceStats, ZV) {}
1717
~MemSetInstFlowFunction() override = default;
1818

19-
std::set<ExtendedValue> computeTargetsExt(ExtendedValue &fact) override;
19+
std::set<ExtendedValue> computeTargetsExt(ExtendedValue &Fact) override;
2020
};
2121

2222
} // namespace psr

0 commit comments

Comments
 (0)