From e56179c7dec5ea1f9041df0e6983b51402a5c384 Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Thu, 8 Oct 2015 17:43:10 +1100 Subject: qtbase: fix build with clang 3.7 --- src/qtbase-1.patch | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) 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 +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 ++struct Nullable: public std::unary_function + { + 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) + + -- cgit v0.12