diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2014-07-14 21:01:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-07-16 15:50:23 (GMT) |
commit | 44726714322ca0b75628e234229f4583a480d7ec (patch) | |
tree | 5e5ffa1fb65bec92047096f68f0d7defe5be1108 /Source/cmXMLParser.h | |
parent | 49bf3e7d8daab2a1e7ba435d011618bd2c516766 (diff) | |
download | CMake-44726714322ca0b75628e234229f4583a480d7ec.zip CMake-44726714322ca0b75628e234229f4583a480d7ec.tar.gz CMake-44726714322ca0b75628e234229f4583a480d7ec.tar.bz2 |
ctest_memcheck: Add support for memory and leak sanitizer.
This adds support for memory and leak sanitizers. This is built into
clang and gcc 4.8 and new compilers. It is activated with a -f switch
during compile.
Diffstat (limited to 'Source/cmXMLParser.h')
-rw-r--r-- | Source/cmXMLParser.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmXMLParser.h b/Source/cmXMLParser.h index 84a5a7d..e72da66 100644 --- a/Source/cmXMLParser.h +++ b/Source/cmXMLParser.h @@ -50,11 +50,18 @@ public: virtual int ParseChunk(const char* inputString, std::string::size_type length); virtual int CleanupParser(); - + typedef void (*ReportFunction)(int, const char*, void*); + void SetErrorCallback(ReportFunction f, void* d) + { + this->ReportCallback = f; + this->ReportCallbackData = d; + } protected: //! This variable is true if there was a parse error while parsing in //chunks. int ParseError; + ReportFunction ReportCallback; + void* ReportCallbackData; //1 Expat parser structure. Exists only during call to Parse(). void* Parser; |