summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-08-27 07:59:46 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-08-27 08:00:03 +0100
commit6c936b92ef0757dbd6d46123124f4f898babadc8 (patch)
tree8fcd0502b9acfa7ddc879c7430574bbd95118577 /dev-util/source-highlight/files
parentdev-python/pycurl: Hack the version to make upgrade less painful (diff)
downloadgentoo-6c936b92ef0757dbd6d46123124f4f898babadc8.tar.gz
gentoo-6c936b92ef0757dbd6d46123124f4f898babadc8.tar.bz2
gentoo-6c936b92ef0757dbd6d46123124f4f898babadc8.zip
dev-util/source-highlight: fix tests on clang
Reported-by: Agostino Sarubbo Closes: https://bugs.gentoo.org/739036 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-util/source-highlight/files')
-rw-r--r--dev-util/source-highlight/files/source-highlight-3.1.9-test-clang-p1.patch30
-rw-r--r--dev-util/source-highlight/files/source-highlight-3.1.9-test-clang-p2.patch39
2 files changed, 69 insertions, 0 deletions
diff --git a/dev-util/source-highlight/files/source-highlight-3.1.9-test-clang-p1.patch b/dev-util/source-highlight/files/source-highlight-3.1.9-test-clang-p1.patch
new file mode 100644
index 00000000000..6b0bad369b8
--- /dev/null
+++ b/dev-util/source-highlight/files/source-highlight-3.1.9-test-clang-p1.patch
@@ -0,0 +1,30 @@
+From b3481e66f2014dece48d8dfe8affa416d8d4e104 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu, 27 Aug 2020 07:51:14 +0100
+Subject: [PATCH 1/2] lib/tests/stdboosterror.h: use unambiguous form of
+ variable declaration
+
+Original expression has an ambiguity and should not compile:
+https://gcc.gnu.org/PR86564
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ lib/tests/stdboosterror.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/tests/stdboosterror.h b/lib/tests/stdboosterror.h
+index 568545b..d59bfa6 100644
+--- a/lib/tests/stdboosterror.h
++++ b/lib/tests/stdboosterror.h
+@@ -4,7 +4,7 @@
+ #include <boost/regex/pattern_except.hpp>
+
+ static boost::regex_error
+- std_boost_exception(boost::regex_error(boost::regex_constants::error_bad_pattern));
++ std_boost_exception = boost::regex_error(boost::regex_constants::error_bad_pattern);
+
+ /**
+ * returns the string representing a standard exception (which
+--
+2.28.0
+
diff --git a/dev-util/source-highlight/files/source-highlight-3.1.9-test-clang-p2.patch b/dev-util/source-highlight/files/source-highlight-3.1.9-test-clang-p2.patch
new file mode 100644
index 00000000000..4c34f9dcca5
--- /dev/null
+++ b/dev-util/source-highlight/files/source-highlight-3.1.9-test-clang-p2.patch
@@ -0,0 +1,39 @@
+From 4d53621557de31479dad3cb44b7fccba8277b76d Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu, 27 Aug 2020 07:52:25 +0100
+Subject: [PATCH 2/2] lib/tests/test_wordtokenizer_main.cpp: insert overload to
+ std namespace
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ lib/tests/test_wordtokenizer_main.cpp | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/lib/tests/test_wordtokenizer_main.cpp b/lib/tests/test_wordtokenizer_main.cpp
+index 40e23b1..02e8fd8 100644
+--- a/lib/tests/test_wordtokenizer_main.cpp
++++ b/lib/tests/test_wordtokenizer_main.cpp
+@@ -11,9 +11,9 @@
+ using namespace std;
+ using namespace srchilite;
+
+-static ostream &operator <<(ostream &os, const WordTokenizer::WordTokenizerResults::value_type &);
+-
+-ostream &operator <<(ostream &os, const WordTokenizer::WordTokenizerResults::value_type &token) {
++/* Argument-dependent lookup looks only at std:: namespace (ostream and value_type expansion) */
++namespace std {
++static ostream &operator <<(ostream &os, const WordTokenizer::WordTokenizerResults::value_type &token) {
+ if (token.first.size()) {
+ os << "space: \"" << token.first << "\"" << endl;
+ } else {
+@@ -22,6 +22,7 @@ ostream &operator <<(ostream &os, const WordTokenizer::WordTokenizerResults::val
+
+ return os;
+ }
++}
+
+ int main() {
+ WordTokenizer::WordTokenizerResults tokens;
+--
+2.28.0
+