diff options
author | Tony Theodore <tonyt@logyst.com> | 2015-10-08 06:43:10 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2015-10-08 06:43:10 (GMT) |
commit | e56179c7dec5ea1f9041df0e6983b51402a5c384 (patch) | |
tree | 6b3920ec2e03296647b46ecc3f18b422c505c3ad | |
parent | 46fe764cf3cdc42f94d4bd24fdeae69c53e63801 (diff) | |
download | mxe-e56179c7dec5ea1f9041df0e6983b51402a5c384.zip mxe-e56179c7dec5ea1f9041df0e6983b51402a5c384.tar.gz mxe-e56179c7dec5ea1f9041df0e6983b51402a5c384.tar.bz2 |
qtbase: fix build with clang 3.7
-rw-r--r-- | src/qtbase-1.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/qtbase-1.patch b/src/qtbase-1.patch index 8a5c5c1..800d802 100644 --- a/src/qtbase-1.patch +++ b/src/qtbase-1.patch @@ -123,3 +123,56 @@ index 3cfb614..8b7063f 100644 -- 2.1.4 +From 141181ce8062e3a9b405ddd3f918161eb2e8ded2 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Thu, 8 Oct 2015 17:15:46 +1100 +Subject: [PATCH 6/6] Fix build with clang 3.7 + +_Nullable is a language extension in clang 3.7 (indicating whether or +not a pointer can be null). +http://clang.llvm.org/docs/AttributeReference.html#nullable + +Using it as a class name breaks building with this compiler + +Taken from: https://codereview.qt-project.org/#/c/121545/2//ALL,unified + +diff --git a/src/tools/qlalr/lalr.cpp b/src/tools/qlalr/lalr.cpp +index 3d0d5de..3d780cd 100644 +--- a/src/tools/qlalr/lalr.cpp ++++ b/src/tools/qlalr/lalr.cpp +@@ -238,11 +238,11 @@ void Grammar::buildExtendedGrammar () + non_terminals.insert (accept_symbol); + } + +-struct _Nullable: public std::unary_function<Name, bool> ++struct Nullable: public std::unary_function<Name, bool> + { + Automaton *_M_automaton; + +- _Nullable (Automaton *aut): ++ Nullable (Automaton *aut): + _M_automaton (aut) {} + + bool operator () (Name name) const +@@ -300,7 +300,7 @@ void Automaton::buildNullables () + + for (RulePointer rule = _M_grammar->rules.begin (); rule != _M_grammar->rules.end (); ++rule) + { +- NameList::iterator nn = std::find_if (rule->rhs.begin (), rule->rhs.end (), std::not1 (_Nullable (this))); ++ NameList::iterator nn = std::find_if (rule->rhs.begin (), rule->rhs.end (), std::not1 (Nullable (this))); + + if (nn == rule->rhs.end ()) + changed |= nullables.insert (rule->lhs).second; +@@ -635,7 +635,7 @@ void Automaton::buildIncludesDigraph () + if (! _M_grammar->isNonTerminal (*A)) + continue; + +- NameList::iterator first_not_nullable = std::find_if (dot, rule->rhs.end (), std::not1 (_Nullable (this))); ++ NameList::iterator first_not_nullable = std::find_if (dot, rule->rhs.end (), std::not1 (Nullable (this))); + if (first_not_nullable != rule->rhs.end ()) + continue; + +-- +2.3.8 (Apple Git-58) + + |