Skip to content

Commit

Permalink
Formatting changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
PetroZarytskyi committed Oct 31, 2023
1 parent bbd7280 commit 543bc0c
Show file tree
Hide file tree
Showing 3 changed files with 213 additions and 221 deletions.
10 changes: 5 additions & 5 deletions include/clad/Differentiator/TBRAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ class TBRAnalyzer : public clang::ConstStmtVisitor<TBRAnalyzer> {
/// Note: the returned VarsData contains original data from
/// the predecessors (NOT copies). It should not be modified.
std::unordered_map<const clang::VarDecl*, VarData*>
collectDataFromPredecessors(VarsData* varsData, VarsData* limit = nullptr);
static collectDataFromPredecessors(VarsData* varsData, VarsData* limit = nullptr);

/// Finds the lowest common ancestor of two VarsData
/// (based on the prev field in VarsData).
VarsData* findLowestCommonAncestor(VarsData* varsData1, VarsData* varsData2);
static VarsData* findLowestCommonAncestor(VarsData* varsData1, VarsData* varsData2);

/// Merges mergeData into targetData. Should be called
/// after mergeData is passed and the corresponding CFG
Expand All @@ -262,7 +262,7 @@ class TBRAnalyzer : public clang::ConstStmtVisitor<TBRAnalyzer> {
/// a new one).
std::vector<short> modeStack;

ASTContext* m_Context;
ASTContext& m_Context;

/// clang::CFG of the function being analysed.
std::unique_ptr<clang::CFG> m_CFG;
Expand Down Expand Up @@ -315,7 +315,7 @@ class TBRAnalyzer : public clang::ConstStmtVisitor<TBRAnalyzer> {

public:
/// Constructor
TBRAnalyzer(ASTContext* m_Context) : m_Context(m_Context) {
TBRAnalyzer(ASTContext& m_Context) : m_Context(m_Context) {
modeStack.push_back(0);
}

Expand All @@ -340,7 +340,7 @@ class TBRAnalyzer : public clang::ConstStmtVisitor<TBRAnalyzer> {
/// Visitors
void Analyze(const clang::FunctionDecl* FD);

void VisitCFGBlock(clang::CFGBlock* block);
void VisitCFGBlock(const clang::CFGBlock* block);

void Visit(const clang::Stmt* stmt) {
clang::ConstStmtVisitor<TBRAnalyzer, void>::Visit(stmt);
Expand Down
Loading

0 comments on commit 543bc0c

Please sign in to comment.