Hello community, here is the log from the commit of package re2 for openSUSE:Factory checked in at 2017-05-20 10:14:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/re2 (Old) and /work/SRC/openSUSE:Factory/.re2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "re2" Sat May 20 10:14:19 2017 rev:7 rq:496525 version:MACRO Changes: -------- --- /work/SRC/openSUSE:Factory/re2/re2.changes 2017-04-20 20:55:04.988897254 +0200 +++ /work/SRC/openSUSE:Factory/.re2.new/re2.changes 2017-05-20 10:14:23.433717632 +0200 @@ -1,0 +2,6 @@ +Fri May 19 08:42:56 UTC 2017 - [email protected] + +- Update to version 2017-05-01 + * No upstream changelog available + +------------------------------------------------------------------- Old: ---- 2017-04-01.tar.gz New: ---- 2017-05-01.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ re2.spec ++++++ --- /var/tmp/diff_new_pack.pYSSHb/_old 2017-05-20 10:14:24.129619308 +0200 +++ /var/tmp/diff_new_pack.pYSSHb/_new 2017-05-20 10:14:24.133618743 +0200 @@ -16,7 +16,7 @@ # -%global longver 2017-04-01 +%global longver 2017-05-01 %global shortver %(echo %{longver}|sed 's|-||g') %define libname libre2-0 Name: re2 ++++++ 2017-04-01.tar.gz -> 2017-05-01.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re2-2017-04-01/CMakeLists.txt new/re2-2017-05-01/CMakeLists.txt --- old/re2-2017-04-01/CMakeLists.txt 2017-03-31 10:30:45.000000000 +0200 +++ new/re2-2017-05-01/CMakeLists.txt 2017-04-24 06:59:29.000000000 +0200 @@ -11,6 +11,10 @@ option(BUILD_SHARED_LIBS "build shared libraries" OFF) option(USEPCRE "use PCRE in tests and benchmarks" OFF) +# CMake seems to have no way to enable/disable testing per subproject, +# so we provide an option similar to BUILD_TESTING, but just for RE2. +option(RE2_BUILD_TESTING "enable testing for RE2" ON) + set(EXTRA_TARGET_LINK_LIBRARIES) if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") @@ -112,7 +116,9 @@ foreach(target ${TEST_TARGETS}) add_executable(${target} re2/testing/${target}.cc util/test.cc) target_link_libraries(${target} testing re2 ${EXTRA_TARGET_LINK_LIBRARIES}) - add_test(NAME ${target} COMMAND ${target}) + if(RE2_BUILD_TESTING) + add_test(NAME ${target} COMMAND ${target}) + endif() endforeach(target) foreach(target ${BENCHMARK_TARGETS}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re2-2017-04-01/re2/prefilter.cc new/re2-2017-05-01/re2/prefilter.cc --- old/re2-2017-04-01/re2/prefilter.cc 2017-03-31 10:30:45.000000000 +0200 +++ new/re2-2017-05-01/re2/prefilter.cc 2017-04-24 06:59:29.000000000 +0200 @@ -49,7 +49,7 @@ } // Nothing left in the AND/OR. - if (subs_->size() == 0) { + if (subs_->empty()) { if (op_ == AND) op_ = ALL; // AND of nothing is true else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re2-2017-04-01/re2/re2.cc new/re2-2017-05-01/re2/re2.cc --- old/re2-2017-04-01/re2/re2.cc 2017-03-31 10:30:45.000000000 +0200 +++ new/re2-2017-05-01/re2/re2.cc 2017-04-24 06:59:29.000000000 +0200 @@ -538,7 +538,7 @@ if (maxlen > 0 && prog_->PossibleMatchRange(&dmin, &dmax, maxlen)) { pmin += dmin; pmax += dmax; - } else if (pmax.size() > 0) { + } else if (!pmax.empty()) { // prog_->PossibleMatchRange has failed us, // but we still have useful information from prefix_. // Round up pmax to allow any possible suffix. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re2-2017-04-01/re2/regexp.h new/re2-2017-05-01/re2/regexp.h --- old/re2-2017-04-01/re2/regexp.h 2017-03-31 10:30:45.000000000 +0200 +++ new/re2-2017-05-01/re2/regexp.h 2017-04-24 06:59:29.000000000 +0200 @@ -276,44 +276,45 @@ // Flags for parsing. Can be ORed together. enum ParseFlags { - NoParseFlags = 0, - FoldCase = 1<<0, // Fold case during matching (case-insensitive). - Literal = 1<<1, // Treat s as literal string instead of a regexp. - ClassNL = 1<<2, // Allow char classes like [^a-z] and \D and \s - // and [[:space:]] to match newline. - DotNL = 1<<3, // Allow . to match newline. - MatchNL = ClassNL | DotNL, - OneLine = 1<<4, // Treat ^ and $ as only matching at beginning and - // end of text, not around embedded newlines. - // (Perl's default) - Latin1 = 1<<5, // Regexp and text are in Latin1, not UTF-8. - NonGreedy = 1<<6, // Repetition operators are non-greedy by default. - PerlClasses = 1<<7, // Allow Perl character classes like \d. - PerlB = 1<<8, // Allow Perl's \b and \B. - PerlX = 1<<9, // Perl extensions: - // non-capturing parens - (?: ) - // non-greedy operators - *? +? ?? {}? - // flag edits - (?i) (?-i) (?i: ) - // i - FoldCase - // m - !OneLine - // s - DotNL - // U - NonGreedy - // line ends: \A \z - // \Q and \E to disable/enable metacharacters - // (?P<name>expr) for named captures - // \C to match any single byte - UnicodeGroups = 1<<10, // Allow \p{Han} for Unicode Han group - // and \P{Han} for its negation. - NeverNL = 1<<11, // Never match NL, even if the regexp mentions - // it explicitly. - NeverCapture = 1<<12, // Parse all parens as non-capturing. + NoParseFlags = 0, + FoldCase = 1<<0, // Fold case during matching (case-insensitive). + Literal = 1<<1, // Treat s as literal string instead of a regexp. + ClassNL = 1<<2, // Allow char classes like [^a-z] and \D and \s + // and [[:space:]] to match newline. + DotNL = 1<<3, // Allow . to match newline. + MatchNL = ClassNL | DotNL, + OneLine = 1<<4, // Treat ^ and $ as only matching at beginning and + // end of text, not around embedded newlines. + // (Perl's default) + Latin1 = 1<<5, // Regexp and text are in Latin1, not UTF-8. + NonGreedy = 1<<6, // Repetition operators are non-greedy by default. + PerlClasses = 1<<7, // Allow Perl character classes like \d. + PerlB = 1<<8, // Allow Perl's \b and \B. + PerlX = 1<<9, // Perl extensions: + // non-capturing parens - (?: ) + // non-greedy operators - *? +? ?? {}? + // flag edits - (?i) (?-i) (?i: ) + // i - FoldCase + // m - !OneLine + // s - DotNL + // U - NonGreedy + // line ends: \A \z + // \Q and \E to disable/enable metacharacters + // (?P<name>expr) for named captures + // \C to match any single byte + UnicodeGroups = 1<<10, // Allow \p{Han} for Unicode Han group + // and \P{Han} for its negation. + NeverNL = 1<<11, // Never match NL, even if the regexp mentions + // it explicitly. + NeverCapture = 1<<12, // Parse all parens as non-capturing. // As close to Perl as we can get. - LikePerl = ClassNL | OneLine | PerlClasses | PerlB | PerlX | - UnicodeGroups, + LikePerl = ClassNL | OneLine | PerlClasses | PerlB | PerlX | + UnicodeGroups, // Internal use only. - WasDollar = 1<<15, // on kRegexpEndText: was $ in regexp text + WasDollar = 1<<13, // on kRegexpEndText: was $ in regexp text + AllParseFlags = (1<<14)-1, }; // Get. No set, Regexps are logically immutable once created. @@ -620,25 +621,29 @@ CharClassBuilder& operator=(const CharClassBuilder&) = delete; }; -// Tell g++ that bitwise ops on ParseFlags produce ParseFlags. -inline Regexp::ParseFlags operator|(Regexp::ParseFlags a, Regexp::ParseFlags b) -{ - return static_cast<Regexp::ParseFlags>(static_cast<int>(a) | static_cast<int>(b)); +// Bitwise ops on ParseFlags produce ParseFlags. +inline Regexp::ParseFlags operator|(Regexp::ParseFlags a, + Regexp::ParseFlags b) { + return static_cast<Regexp::ParseFlags>( + static_cast<int>(a) | static_cast<int>(b)); } -inline Regexp::ParseFlags operator^(Regexp::ParseFlags a, Regexp::ParseFlags b) -{ - return static_cast<Regexp::ParseFlags>(static_cast<int>(a) ^ static_cast<int>(b)); +inline Regexp::ParseFlags operator^(Regexp::ParseFlags a, + Regexp::ParseFlags b) { + return static_cast<Regexp::ParseFlags>( + static_cast<int>(a) ^ static_cast<int>(b)); } -inline Regexp::ParseFlags operator&(Regexp::ParseFlags a, Regexp::ParseFlags b) -{ - return static_cast<Regexp::ParseFlags>(static_cast<int>(a) & static_cast<int>(b)); +inline Regexp::ParseFlags operator&(Regexp::ParseFlags a, + Regexp::ParseFlags b) { + return static_cast<Regexp::ParseFlags>( + static_cast<int>(a) & static_cast<int>(b)); } -inline Regexp::ParseFlags operator~(Regexp::ParseFlags a) -{ - return static_cast<Regexp::ParseFlags>(~static_cast<int>(a)); +inline Regexp::ParseFlags operator~(Regexp::ParseFlags a) { + // Attempting to produce a value out of enum's range has undefined behaviour. + return static_cast<Regexp::ParseFlags>( + ~static_cast<int>(a) & static_cast<int>(Regexp::AllParseFlags)); } } // namespace re2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re2-2017-04-01/re2/testing/exhaustive_tester.h new/re2-2017-05-01/re2/testing/exhaustive_tester.h --- old/re2-2017-04-01/re2/testing/exhaustive_tester.h 2017-03-31 10:30:45.000000000 +0200 +++ new/re2-2017-05-01/re2/testing/exhaustive_tester.h 2017-04-24 06:59:29.000000000 +0200 @@ -15,10 +15,15 @@ namespace re2 { +// Doing this simplifies the logic below. +#ifndef __has_feature +#define __has_feature(x) 0 +#endif + #if !defined(NDEBUG) // We are in a debug build. const bool RE2_DEBUG_MODE = true; -#elif ADDRESS_SANITIZER || MEMORY_SANITIZER || THREAD_SANITIZER +#elif __has_feature(address_sanitizer) || __has_feature(memory_sanitizer) || __has_feature(thread_sanitizer) // Not a debug build, but still under sanitizers. const bool RE2_DEBUG_MODE = true; #else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re2-2017-04-01/re2/testing/re2_test.cc new/re2-2017-05-01/re2/testing/re2_test.cc --- old/re2-2017-04-01/re2/testing/re2_test.cc 2017-03-31 10:30:45.000000000 +0200 +++ new/re2-2017-05-01/re2/testing/re2_test.cc 2017-04-24 06:59:29.000000000 +0200 @@ -388,7 +388,7 @@ // A meta-quoted string, interpreted as a pattern, should always match // the original unquoted string. -static void TestQuoteMeta(string unquoted, +static void TestQuoteMeta(const string& unquoted, const RE2::Options& options = RE2::DefaultOptions) { string quoted = RE2::QuoteMeta(unquoted); RE2 re(quoted, options); @@ -398,8 +398,9 @@ // A meta-quoted string, interpreted as a pattern, should always match // the original unquoted string. -static void NegativeTestQuoteMeta(string unquoted, string should_not_match, - const RE2::Options& options = RE2::DefaultOptions) { +static void NegativeTestQuoteMeta( + const string& unquoted, const string& should_not_match, + const RE2::Options& options = RE2::DefaultOptions) { string quoted = RE2::QuoteMeta(unquoted); RE2 re(quoted, options); EXPECT_FALSE(RE2::FullMatch(should_not_match, re)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re2-2017-04-01/re2/testing/regexp_generator.cc new/re2-2017-05-01/re2/testing/regexp_generator.cc --- old/re2-2017-04-01/re2/testing/regexp_generator.cc 2017-03-31 10:30:45.000000000 +0200 +++ new/re2-2017-05-01/re2/testing/regexp_generator.cc 2017-04-24 06:59:29.000000000 +0200 @@ -56,9 +56,9 @@ const std::vector<string>& ops) : maxatoms_(maxatoms), maxops_(maxops), atoms_(atoms), ops_(ops) { // Degenerate case. - if (atoms_.size() == 0) + if (atoms_.empty()) maxatoms_ = 0; - if (ops_.size() == 0) + if (ops_.empty()) maxops_ = 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re2-2017-04-01/re2/testing/string_generator.cc new/re2-2017-05-01/re2/testing/string_generator.cc --- old/re2-2017-04-01/re2/testing/string_generator.cc 2017-03-31 10:30:45.000000000 +0200 +++ new/re2-2017-05-01/re2/testing/string_generator.cc 2017-04-24 06:59:29.000000000 +0200 @@ -24,7 +24,7 @@ random_(false), nrandom_(0) { // Degenerate case: no letters, no non-empty strings. - if (alphabet_.size() == 0) + if (alphabet_.empty()) maxlen_ = 0; // Next() will return empty string (digits_ is empty). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re2-2017-04-01/re2/testing/string_generator_test.cc new/re2-2017-05-01/re2/testing/string_generator_test.cc --- old/re2-2017-04-01/re2/testing/string_generator_test.cc 2017-03-31 10:30:45.000000000 +0200 +++ new/re2-2017-05-01/re2/testing/string_generator_test.cc 2017-04-24 06:59:29.000000000 +0200 @@ -31,7 +31,7 @@ // If all of these hold, the StringGenerator is behaving. // Assumes that the alphabet is sorted, so that the generated // strings can just be compared lexicographically. -static void RunTest(int len, string alphabet, bool donull) { +static void RunTest(int len, const string& alphabet, bool donull) { StringGenerator g(len, Explode(alphabet)); int n = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re2-2017-04-01/re2/tostring.cc new/re2-2017-05-01/re2/tostring.cc --- old/re2-2017-04-01/re2/tostring.cc 2017-03-31 10:30:45.000000000 +0200 +++ new/re2-2017-05-01/re2/tostring.cc 2017-04-24 06:59:29.000000000 +0200 @@ -131,8 +131,7 @@ t->append(1, '\\'); t->append(1, static_cast<char>(r)); } else if (foldcase && 'a' <= r && r <= 'z') { - if ('a' <= r && r <= 'z') - r += 'A' - 'a'; + r -= 'a' - 'A'; t->append(1, '['); t->append(1, static_cast<char>(r)); t->append(1, static_cast<char>(r) + 'a' - 'A'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re2-2017-04-01/util/sparse_array.h new/re2-2017-05-01/util/sparse_array.h --- old/re2-2017-04-01/util/sparse_array.h 2017-03-31 10:30:45.000000000 +0200 +++ new/re2-2017-05-01/util/sparse_array.h 2017-04-24 06:59:29.000000000 +0200 @@ -415,12 +415,14 @@ dense_.resize(max_size); -#ifdef MEMORY_SANITIZER +#if defined(__has_feature) +#if __has_feature(memory_sanitizer) for (int i = max_size_; i < max_size; i++) { sparse_to_dense_[i] = 0xababababU; dense_[i].index_ = 0xababababU; } #endif +#endif } max_size_ = max_size; if (size_ > max_size_) @@ -483,12 +485,14 @@ dense_.resize(max_size); size_ = 0; -#ifdef MEMORY_SANITIZER +#if defined(__has_feature) +#if __has_feature(memory_sanitizer) for (int i = 0; i < max_size; i++) { sparse_to_dense_[i] = 0xababababU; dense_[i].index_ = 0xababababU; } #endif +#endif DebugCheckInvariants(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/re2-2017-04-01/util/sparse_set.h new/re2-2017-05-01/util/sparse_set.h --- old/re2-2017-04-01/util/sparse_set.h 2017-03-31 10:30:45.000000000 +0200 +++ new/re2-2017-05-01/util/sparse_set.h 2017-04-24 06:59:29.000000000 +0200 @@ -183,12 +183,14 @@ dense_.resize(max_size); -#ifdef MEMORY_SANITIZER +#if defined(__has_feature) +#if __has_feature(memory_sanitizer) for (int i = max_size_; i < max_size; i++) { sparse_to_dense_[i] = 0xababababU; dense_[i] = 0xababababU; } #endif +#endif } max_size_ = max_size; if (size_ > max_size_) @@ -224,12 +226,14 @@ dense_.resize(max_size); size_ = 0; -#ifdef MEMORY_SANITIZER +#if defined(__has_feature) +#if __has_feature(memory_sanitizer) for (int i = 0; i < max_size; i++) { sparse_to_dense_[i] = 0xababababU; dense_[i] = 0xababababU; } #endif +#endif DebugCheckInvariants(); }
