diff options
author | martinboehme <mboehme@google.com> | 2024-02-01 05:31:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-01 05:31:32 +0100 |
commit | 994493ce05ab7351cd92d30fb1bd23985b292851 (patch) | |
tree | bac6a6a3e42e25901d221b975a365844676924ef | |
parent | 908fd09a13b2e89a52282478544f7f70cf0a887f (diff) |
[clang][dataflow][NFC] Rename a confusingly named variable. (#80182)
-rw-r--r-- | clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp b/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp index 1e098d8d23c4..ff4e18de2c70 100644 --- a/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp +++ b/clang/lib/Analysis/FlowSensitive/HTMLLogger.cpp @@ -162,7 +162,7 @@ class HTMLLogger : public Logger { llvm::raw_string_ostream JStringStream{JSON}; llvm::json::OStream JOS{JStringStream, /*Indent=*/2}; - const ControlFlowContext *CFG; + const ControlFlowContext *CFC; // Timeline of iterations of CFG block visitation. std::vector<Iteration> Iters; // Indexes in `Iters` of the iterations for each block. @@ -176,15 +176,15 @@ class HTMLLogger : public Logger { public: explicit HTMLLogger(StreamFactory Streams) : Streams(std::move(Streams)) {} - void beginAnalysis(const ControlFlowContext &CFG, + void beginAnalysis(const ControlFlowContext &CFC, TypeErasedDataflowAnalysis &A) override { OS = Streams(); - this->CFG = &CFG; + this->CFC = &CFC; *OS << llvm::StringRef(HTMLLogger_html).split("<?INJECT?>").first; - BlockConverged.resize(CFG.getCFG().getNumBlockIDs()); + BlockConverged.resize(CFC.getCFG().getNumBlockIDs()); - const auto &D = CFG.getDecl(); + const auto &D = CFC.getDecl(); const auto &SM = A.getASTContext().getSourceManager(); *OS << "<title>"; if (const auto *ND = dyn_cast<NamedDecl>(&D)) @@ -345,7 +345,7 @@ private: // tokens are associated with, and even which BB element (so that clicking // can select the right element). void writeCode() { - const auto &AST = CFG->getDecl().getASTContext(); + const auto &AST = CFC->getDecl().getASTContext(); bool Invalid = false; // Extract the source code from the original file. @@ -353,7 +353,7 @@ private: // indentation to worry about), but we need the boundaries of particular // AST nodes and the printer doesn't provide this. auto Range = clang::Lexer::makeFileCharRange( - CharSourceRange::getTokenRange(CFG->getDecl().getSourceRange()), + CharSourceRange::getTokenRange(CFC->getDecl().getSourceRange()), AST.getSourceManager(), AST.getLangOpts()); if (Range.isInvalid()) return; @@ -419,7 +419,7 @@ private: // Construct one TokenInfo per character in a flat array. // This is inefficient (chars in a token all have the same info) but simple. std::vector<TokenInfo> State(Code.size()); - for (const auto *Block : CFG->getCFG()) { + for (const auto *Block : CFC->getCFG()) { unsigned EltIndex = 0; for (const auto& Elt : *Block) { ++EltIndex; @@ -480,7 +480,7 @@ private: // out to `dot` to turn it into an SVG. void writeCFG() { *OS << "<template data-copy='cfg'>\n"; - if (auto SVG = renderSVG(buildCFGDot(CFG->getCFG()))) + if (auto SVG = renderSVG(buildCFGDot(CFC->getCFG()))) *OS << *SVG; else *OS << "Can't draw CFG: " << toString(SVG.takeError()); |