Skip to content

Commit

Permalink
Thread safety analysis: provide printSCFG definition. (#80277)
Browse files Browse the repository at this point in the history
I called this function when investigating the issue
(#78131), and I was surprised
to see the definition is commented out.

I think it makes sense to provide the definition even though the
implementation is not stable.
  • Loading branch information
hokein committed Feb 26, 2024
1 parent 78275ef commit be02430
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions clang/include/clang/Analysis/Analyses/ThreadSafetyCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,10 @@ class SExprBuilder {
BlockInfo *CurrentBlockInfo = nullptr;
};

#ifndef NDEBUG
// Dump an SCFG to llvm::errs().
void printSCFG(CFGWalker &Walker);
#endif // NDEBUG

} // namespace threadSafety
} // namespace clang
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/Analysis/ThreadSafetyCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ void SExprBuilder::exitCFG(const CFGBlock *Last) {
IncompleteArgs.clear();
}

/*
#ifndef NDEBUG
namespace {

class TILPrinter :
Expand All @@ -1016,4 +1016,4 @@ void printSCFG(CFGWalker &Walker) {

} // namespace threadSafety
} // namespace clang
*/
#endif // NDEBUG

0 comments on commit be02430

Please sign in to comment.