aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-10-17Fix access modifier offsetclang-formatArseny Kapoulkine5-57/+58
2018-10-17Fix compilation by setting clang-format standard to C++03Arseny Kapoulkine3-24/+25
2018-10-17ReformatArseny Kapoulkine38-11600/+12575
2018-10-17Add .clang-format and Makefile rule for formattingArseny Kapoulkine2-0/+13
2018-10-16Remove warning in Visual Studio (#235)Dan Lipsa1-0/+9
The following warning is removed: Visual Studio 14.0 1. warning C4275: non dll-interface class 'std::exception' used as base for dll-interface class 'vtkpugixml::xpath_exception'
2018-09-24Work around clang --analyze warningsArseny Kapoulkine1-4/+8
clang doesn't understand the invariants guaranteed for specific AST node types and, when seeing null pointer checks in optimize(), assumes any pointers in the node might be null. Work around this by adding explicit - redundant - null pointer checks.
2018-09-24XPath: Refactor xpath_node_set short buffer optimizationArseny Kapoulkine2-41/+28
This change replaces xpath_node_set single element storage with a single-element array in hopes that this would silence Coverity false positive about getting a singleton pointer. Additionally, it refactors _assign member to unify small and large buffer codepaths since they are basically identical. Fixes #233 (hopefully)
2018-08-13tests: Fix XPath denorm tests on Intel compilerArseny Kapoulkine1-1/+7
Intel compiler by default sets flush-to-zero flags which causes our denorm test to produce 0.0. So make sure that denorms work on FPU before testing the string output. Fixes #218.
2018-08-13Minor CMakeLists.txt cleanupArseny Kapoulkine1-1/+1
Instead of hardcoding SOVERSION, use CMake variables to set it up. Closes #220.
2018-08-07Visual Studio Natvis visualization (#227)Vyacheslav Egorov1-0/+77
* Visual Studio Natvis visualization * Changed string format to remove separate natvis file for wide character mode * Display any node type with name and value if any of them are available
2018-07-30tests: Allow document_load_file_special_folder to load empty documentArseny Kapoulkine1-1/+2
On some Debian systems it looks like we *can* open the current folder as a file and read its contents, but parsing the result produces an empty document. We now handle this case as well. Fixes #225.
2018-07-28Fix version comment; 190 = 1.9.0 (major.minor.patch)Arseny Kapoulkine1-1/+1
Fixes #224.
2018-07-23Add .gitattributes fileArseny Kapoulkine1-0/+1
This makes sure the contents of tests/data/ folder does not go through newline conversion, which breaks tests that rely on some files having LF and some files having CR+LF. Fixes #222.
2018-07-22scripts: Set file permissions when building .zip archiveArseny Kapoulkine1-0/+1
It looks like zipfile module by default uses the permission mask 0, which after unpacking on Unix-based systems leads to the files being inaccessible. We now explicitly set file mask to rw-r--r-- to match .tar.gz defaults. Fixes #217.
2018-06-26Use CMAKE_INSTALL_LIBDIR for pugixml.pc (#215)Wolfgang Stöggl2-2/+2
- Up to now, the libdir was hardcoded to "lib" inside pugixml.pc and the install directory of pugixml.pc was "lib/pkgconfig" - Adds support for lib and lib64 by using CMAKE_INSTALL_LIBDIR variable
2018-06-20fix cmake warning "Policy CMP0048 is not set" (#214)Bernd Amend2-6/+5
This also bumps the minimum CMake version to 3.0 (from 2.8.12).
2018-05-17docs: Mention that node is a container of children in ranged for sectionArseny Kapoulkine2-1/+16
This is implicitly true due to the following section, but that was written before C++11 so this does deserve a special mention in ranged for section as well. Fixes #210.
2018-04-27Move CMake build postfix setup behind an off-by-default USE_POSTFIXArseny Kapoulkine1-1/+2
This setup can interfere with existing workflows in two ways: - If the target application used CMake and configured custom postfixes, this change would override them - If the target application did *not* use CMake, it'd have to abide by these conventions even if the target configuration used is unexpected - for example, the default "preferred" configuration is frequently RelWithDebugInfo, not Release, which now has a postfix. Fixes #198.
2018-04-14Clarify comment in get_strconv_pcdata as wellArseny Kapoulkine1-1/+1
2018-04-14Clarify comment in get_strconv_attributeArseny Kapoulkine1-1/+1
This might have helped a bit with confusion in #195.
2018-04-12Update README.mdArseny Kapoulkine1-0/+50
Add example code
2018-04-12scripts: Use LICENSE file in pugixml.podspecArseny Kapoulkine1-24/+1
We no longer need to specify the license boilerplate verbatim since we have a separate file.
2018-04-11Suffixes for different build types (#191)Alexander Straub1-0/+4
2018-04-11Add brief license information back to README.mdArseny Kapoulkine2-1/+5
Also rename LICENSE to LICENSE.md
2018-04-11Split LICENSE to a separate file for easier distributionBruno Pagani2-28/+26
Also fix two http → https occurrences.
2018-04-09cmake: always install the pkg-config file (#193)Eli Schwartz2-9/+7
There's really never a reason to *not* want this installed. If an option is needed to specify installing in a versioned subdirectory, this option should be explicitly described rather than hidden in something else. As an added bonus, this makes the CMake install code slightly *less* complicated.
2018-04-04docs: Fix changelog formattingArseny Kapoulkine2-4/+6
2018-04-04tests: Fix PUGIXML_COMPACT build on some platformsv1.9Arseny Kapoulkine1-1/+1
We need bad_alloc that lives in <new>, not <exception>.
2018-04-03tests: Fix PUGIXML_NO_XPATH,PUGIXML_COMPACT buildArseny Kapoulkine1-0/+4
pugixml.hpp wasn't including the <exception> header in this build but test code needed it.
2018-04-03tests: Fix PUGIXML_NO_XPATH buildArseny Kapoulkine1-0/+2
2018-04-02tests: Fix PUGIXML_NO_EXCEPTIONS testsArseny Kapoulkine1-6/+6
2018-04-02docs: Regenerate HTML documentationArseny Kapoulkine2-11/+96
2018-04-02Update version to 1.9Arseny Kapoulkine8-9/+9
2018-04-02tests: Fix PUGIXML_NO_STL buildArseny Kapoulkine2-6/+12
2018-04-02docs: Update changelogArseny Kapoulkine1-0/+1
2018-04-02Work around gcc-8 warningArseny Kapoulkine1-2/+2
gcc-8 produces "attribute directive ignored" warning for no_sanitize("unsigned-integer-overflow"); at some point gcc will introduce integer sanitizer support and we'll have to do this all over again but for now just don't emit the attribute.
2018-04-02docs: Update v1.9 release date to 04.04Arseny Kapoulkine1-1/+3
2018-03-29Add a comment to clarify subtle branch in node_copy_treeArseny Kapoulkine1-0/+1
2018-03-16docs: Update changelogArseny Kapoulkine1-0/+1
Mention ubsan fixes; these fixes probably fix compact mode on some 64-bit architecture where unaligned pointer reads aren't valid as well but it's probably not very relevant...
2018-03-16tests: Fix PUGIXML_COMPACT+PUGIXML_WCHAR_MODE testsArseny Kapoulkine2-4/+4
Several tests got the buffer size wrong when sizeof(char_t)>1, and one test didn't meet the carefully tuned allocation criteria under compact mode due to the hash table usage and had to be changed a bit.
2018-03-16ubsan: Fix undefined behavior for signed left shift in compact modeArseny Kapoulkine1-2/+2
We were using << compact_alignment_log2 instead of * compact_alignment for symmetry with the encoding where >> is crucial to keep code fast and round to negative infinity. For decoding, the results are the same and any reasonable compiler should convert *4 into <<2 so just use a multiplication - that doesn't trigger UB on negative numbers.
2018-03-15ubsan: Fix type mismatch for xml_extra_buffer in compact modeArseny Kapoulkine1-1/+7
We were using allocate_memory to allocate struct xml_extra_buffer that contains pointers; with compact mode, this allocation can be misaligned by 4b with 8b pointers; fix this by manually realigning the pointer.
2018-03-15ubsan: Fix type mismatch in compact mode for document dataArseny Kapoulkine1-1/+2
We were misaligning document data on 64-bit platforms by placing 8b pointers at 4b offsets; fix this by reserving a full pointer worth of bytes for page marker.
2018-03-15Refactor noexcept macrosArseny Kapoulkine1-13/+11
Define noexcept using _MSC_VER instead of _MSC_FULL_VER (first release of MSVC 2015 should have it), remove redundant PUGIXML_HAS_NOEXCEPT and define PUGIXML_NOEXCEPT_IF_NOT_COMPACT in terms of PUGIXML_NOEXCEPT.
2018-03-12docs: Add preliminary 1.9 changelogArseny Kapoulkine1-0/+25
Still trying to decide if the next version should be 1.9 or 1.8x and what other changes need to go in.
2018-03-03Adds noexcept specifiers to the move special members of xml_document,… (#185)Matthäus Brandl2-6/+12
* Adds noexcept specifiers to the move special members of xml_document, but only #ifndef PUGIXML_COMPACT
2018-03-01Add noexcept specifiers to move special members where possible (#183)Matthäus Brandl2-14/+28
* Adds a macro definition to be able to use noexcept with supporting compilers * Adds noexcept specifier to move special members of xpath_node_set, xpath_variable_set and xpath_query, but not of xml_document as it has a throwing implementation
2018-02-27Merge pull request #184 from brandl-muc/override_for_msvcArseny Kapoulkine1-0/+2
Enables usage of override specifier for MSVC compilers
2018-02-27Enables usage of override specifier for MSVC compilers (beginning with 17.0 ↵Brandl, Matthäus (MBR)1-0/+2
which is the compiler of Visual Studio 2012)
2018-02-27Fix Texas Instruments compiler warningArseny Kapoulkine1-0/+4
Texas Instruments compiler produces this warning for unused template member functions: "pugixml.cpp", line 253: warning #179-D: function "pugi::impl::<unnamed>::auto_deleter<T>::release [with T=pugi::impl::<unnamed>::xml_stream_chunk<char>]" was declared but never referenced As far as I can tell, this is a compiler issue - these functions should not be instantiated in the first place; while it's possible to rework the code to work around this, the changes would be fragile. It seems best to just disable this warning - we've seen something similar on SNC (which appears to use the same frontend!..). Fixes #182.