diff options
author | Brad King <brad.king@kitware.com> | 2015-06-22 15:31:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-06-22 15:41:51 (GMT) |
commit | 5d85fb4f407cd661fb904f68e2c9cc27ddcc0331 (patch) | |
tree | c9955ec515ddd96a35def323fd3a16a15a6dccec /Source/cmMakefile.h | |
parent | 3a65606591818281ba75bac4751e07c69751451f (diff) | |
download | CMake-5d85fb4f407cd661fb904f68e2c9cc27ddcc0331.zip CMake-5d85fb4f407cd661fb904f68e2c9cc27ddcc0331.tar.gz CMake-5d85fb4f407cd661fb904f68e2c9cc27ddcc0331.tar.bz2 |
Fix assertion failure on unmatched function or macro
The fix in commit v3.2.3~3^2 (Fix assertion failure on unmatched foreach
in function, 2015-05-18) broke handling of unmatched non-loop blocks
because it assumed all function blockers removed during error unwinding
were for loops, essentially switching the set of mishandled cases.
The purpose of the loop block push/pop operations is to define a scope
matching the lifetime of the loop function blockers. Since our function
blockers already have the proper lifetime, simply move the push/pop
operations to their constructor/destructor.
Extend the RunCMake.Syntax test with a case covering this.
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index bff8c12..53a0805 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -125,15 +125,6 @@ public: }; friend class LexicalPushPop; - class LoopBlockPop - { - public: - LoopBlockPop(cmMakefile* mf) { this->Makefile = mf; } - ~LoopBlockPop() { this->Makefile->PopLoopBlock(); } - private: - cmMakefile* Makefile; - }; - /** * Try running cmake and building a file. This is used for dynalically * loaded commands, not as part of the usual build process. |