| 2896 | } |
| 2897 | |
| 2898 | void 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 | |
| 2925 | void cmMakefile::PushLoopBlock() |
| 2926 | { |
no test coverage detected