MCPcopy Create free account
hub / github.com/Kitware/CMake / PopFunctionBlockerBarrier

Method PopFunctionBlockerBarrier

Source/cmMakefile.cxx:2898–2923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2896}
2897
2898void cmMakefile::PopFunctionBlockerBarrier(bool reportError)
2899{
2900 // Remove any extra entries pushed on the barrier.
2901 FunctionBlockersType::size_type barrier =
2902 this->FunctionBlockerBarriers.back();
2903 while (this->FunctionBlockers.size() > barrier) {
2904 std::unique_ptr<cmFunctionBlocker> fb(
2905 std::move(this->FunctionBlockers.top()));
2906 this->FunctionBlockers.pop();
2907 if (reportError) {
2908 // Report the context in which the unclosed block was opened.
2909 cmListFileContext const& lfc = fb->GetStartingContext();
2910 std::ostringstream e;
2911 /* clang-format off */
2912 e << "A logical block opening on the line\n"
2913 " " << lfc << "\n"
2914 "is not closed.";
2915 /* clang-format on */
2916 this->IssueMessage(MessageType::FATAL_ERROR, e.str());
2917 reportError = false;
2918 }
2919 }
2920
2921 // Remove the barrier.
2922 this->FunctionBlockerBarriers.pop_back();
2923}
2924
2925void cmMakefile::PushLoopBlock()
2926{

Callers 5

PopFunctionScopeMethod · 0.95
PopMacroScopeMethod · 0.95
~IncludeScopeMethod · 0.80
~ListFileScopeMethod · 0.80
~BuildsystemFileScopeMethod · 0.80

Calls 6

IssueMessageMethod · 0.95
moveFunction · 0.85
strMethod · 0.80
pop_backMethod · 0.80
backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected