Bug 83430 - Error building RegExpCache.cpp with ToT Clang
Summary: Error building RegExpCache.cpp with ToT Clang
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-08 02:13 PDT by Bill Wendling
Modified: 2013-09-25 11:18 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Wendling 2012-04-08 02:13:33 PDT
When I try to build WebKit with the latest top-of-tree Clang, I get this error:

$ clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -stdlib=libc++ -Wno-trigraphs -fno-exceptions -fno-rtti -fpascal-strings -O3 -Werror -Wmissing-prototypes -Wno-return-type -Wnon-virtual-dtor -Wparentheses -Wswitch -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-shorten-64-to-32 -Wnewline-eof -Wno-c++0x-extensions -DNDEBUG -DHAVE_DTRACE=1 -DWEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST -DHAVE_HEADER_DETECTION_H -fasm-blocks -fstrict-aliasing -mmacosx-version-min=10.7 -gdwarf-2 -fvisibility=hidden -fvisibility-inlines-hidden -fno-threadsafe-statics -Wno-sign-conversion -I/Users/void/llvm/WebKit/llvm/WebKit/WebKitBuild/JavaScriptCore.build/Release/JavaScriptCore.build/JavaScriptCore.hmap -I/Users/void/llvm/WebKit/llvm/WebKit/WebKitBuild/Release/include -I/Users/void/llvm/WebKit/llvm/WebKit/WebKitBuild/Release/DerivedSources/JavaScriptCore -I. -Iicu -I/Users/void/llvm/WebKit/llvm/WebKit/WebKitBuild/Release/usr/local/include -I/Users/void/llvm/WebKit/llvm/WebKit/WebKitBuild/JavaScriptCore.build/Release/JavaScriptCore.build/DerivedSources/x86_64 -I/Users/void/llvm/WebKit/llvm/WebKit/WebKitBuild/JavaScriptCore.build/Release/JavaScriptCore.build/DerivedSources -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wglobal-constructors -Wexit-time-destructors -F/Users/void/llvm/WebKit/llvm/WebKit/WebKitBuild/Release -include /var/folders/v7/xx0tg22s1r97p9hg01fr1ybh0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/JavaScriptCorePrefix-cfxyefwvgdfkdsceqrlhepgmxqcx/JavaScriptCorePrefix.h -MMD -MT dependencies -MF /Users/void/llvm/WebKit/llvm/WebKit/WebKitBuild/JavaScriptCore.build/Release/JavaScriptCore.build/Objects-normal/x86_64/RegExpCache.d -c /Users/void/llvm/WebKit/llvm/WebKit/Source/JavaScriptCore/runtime/RegExpCache.cpp -o /Users/void/llvm/WebKit/llvm/WebKit/WebKitBuild/JavaScriptCore.build/Release/JavaScriptCore.build/Objects-normal/x86_64/RegExpCache.o
In file included from /Users/void/llvm/WebKit/llvm/WebKit/WebKitBuild/Release/usr/local/include/wtf/HashMap.h:24:
In file included from /Users/void/llvm/WebKit/llvm/WebKit/Source/JavaScriptCore/runtime/JSValue.h:31:
In file included from /Users/void/llvm/WebKit/llvm/WebKit/Source/JavaScriptCore/runtime/CachedTranscendentalFunction.h:29:
In file included from /Users/void/llvm/WebKit/llvm/WebKit/Source/JavaScriptCore/runtime/JSGlobalData.h:32:
In file included from /Users/void/llvm/WebKit/llvm/WebKit/Source/JavaScriptCore/interpreter/CallFrame.h:27:
In file included from /Users/void/llvm/WebKit/llvm/WebKit/Source/JavaScriptCore/runtime/ClassInfo.h:26:
In file included from /Users/void/llvm/WebKit/llvm/WebKit/Source/JavaScriptCore/runtime/Structure.h:29:
In file included from /Users/void/llvm/WebKit/llvm/WebKit/Source/JavaScriptCore/runtime/RegExp.h:28:
In file included from /Users/void/llvm/WebKit/llvm/WebKit/Source/JavaScriptCore/runtime/RegExpCache.h:28:
In file included from /Users/void/llvm/WebKit/llvm/WebKit/Source/JavaScriptCore/runtime/RegExpCache.cpp:30:
/Users/void/llvm/WebKit/llvm/WebKit/WebKitBuild/Release/usr/local/include/wtf/HashTable.h:653:36:{653:42-653:62}: error: no matching constructor for initialization of 'std::__1::pair<JSC::RegExpKey, JSC::Weak<JSC::RegExp> >' [2]
             new (NotNull, &bucket) Value(Traits::emptyValue());
                                    ^     ~~~~~~~~~~~~~~~~~~~~
/Users/void/llvm/WebKit/llvm/WebKit/WebKitBuild/Release/usr/local/include/wtf/HashTable.h:670:9: note: in instantiation of function template specialization 'WTF::HashTableBucketInitializer<false>::initialize<WTF::PairHashTraits<WTF::HashTraits<JSC::RegExpKey>, WTF::HashTraits<JSC::Weak<JSC::RegExp> > >, std::__1::pair<JSC::RegExpKey, JSC::Weak<JSC::RegExp> > >' requested here [2]
         HashTableBucketInitializer<Traits::emptyValueIsZero>::template initialize<Traits>(bucket);
         ^
/Users/void/llvm/WebKit/llvm/WebKit/WebKitBuild/Release/usr/local/include/wtf/HashTable.h:733:13: note: in instantiation of member function 'WTF::HashTable<JSC::RegExpKey, std::__1::pair<JSC::RegExpKey, JSC::Weak<JSC::RegExp> >, WTF::PairFirstExtractor<std::__1::pair<JSC::RegExpKey, JSC::Weak<JSC::RegExp> > >, WTF::RegExpHash<JSC::RegExpKey>, WTF::PairHashTraits<WTF::HashTraits<JSC::RegExpKey>, WTF::HashTraits<JSC::Weak<JSC::RegExp> > >, WTF::HashTraits<JSC::RegExpKey> >::initializeBucket' requested here [2]
             initializeBucket(*deletedEntry);
             ^
/Users/void/llvm/WebKit/llvm/WebKit/WebKitBuild/Release/usr/local/include/wtf/HashMap.h:326:32: note: in instantiation of function template specialization 'WTF::HashTable<JSC::RegExpKey, std::__1::pair<JSC::RegExpKey, JSC::Weak<JSC::RegExp> >, WTF::PairFirstExtractor<std::__1::pair<JSC::RegExpKey, JSC::Weak<JSC::RegExp> > >, WTF::RegExpHash<JSC::RegExpKey>, WTF::PairHashTraits<WTF::HashTraits<JSC::RegExpKey>, WTF::HashTraits<JSC::Weak<JSC::RegExp> > >, WTF::HashTraits<JSC::RegExpKey> >::add<WTF::HashMapTranslator<WTF::PairHashTraits<WTF::HashTraits<JSC::RegExpKey>, WTF::HashTraits<JSC::Weak<JSC::RegExp> > >, WTF::RegExpHash<JSC::RegExpKey> >, JSC::RegExpKey, JSC::PassWeak<JSC::RegExp> >' requested here [2]
         return m_impl.template add<HashMapTranslator<ValueTraits, HashFunctions> >(key, mapped);
                                ^
/Users/void/llvm/WebKit/llvm/WebKit/WebKitBuild/Release/usr/local/include/wtf/HashMap.h:353:16: note: in instantiation of member function 'WTF::HashMap<JSC::RegExpKey, JSC::Weak<JSC::RegExp>, WTF::RegExpHash<JSC::RegExpKey>, WTF::HashTraits<JSC::RegExpKey>, WTF::HashTraits<JSC::Weak<JSC::RegExp> > >::inlineAdd' requested here [2]
         return inlineAdd(key, mapped);
                ^
/Users/void/llvm/WebKit/llvm/WebKit/Source/JavaScriptCore/runtime/RegExpCache.cpp:49:17: note: in instantiation of member function 'WTF::HashMap<JSC::RegExpKey, JSC::Weak<JSC::RegExp>, WTF::RegExpHash<JSC::RegExpKey>, WTF::HashTraits<JSC::RegExpKey>, WTF::HashTraits<JSC::Weak<JSC::RegExp> > >::add' requested here [2]
     m_weakCache.add(key, PassWeak<RegExp>(*m_globalData, regExp, this));
                 ^
/usr/include/c++/v1/utility:200:24: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'EmptyValueType' (aka 'pair<typename FirstTraits::EmptyValueType, typename SecondTraits::EmptyValueType>') to 'const std::__1::pair<JSC::RegExpKey, JSC::Weak<JSC::RegExp> >' for 1st argument;  [2]
 struct _LIBCPP_VISIBLE pair
                        ^
/usr/include/c++/v1/utility:215:9: note: candidate template ignored: substitution failure [with _U1 = JSC::RegExpKey, _U2 = std::__1::nullptr_t] [2]
         pair(const pair<_U1, _U2>& __p,
         ^
/usr/include/c++/v1/utility:208:31: note: candidate constructor not viable: requires 0 arguments, but 1 was provided [2]
     _LIBCPP_INLINE_VISIBILITY pair() : first(), second() {}
                               ^
/usr/include/c++/v1/utility:210:31: note: candidate constructor not viable: requires 2 arguments, but 1 was provided [2]
     _LIBCPP_INLINE_VISIBILITY pair(const _T1& __x, const _T2& __y)
                               ^
1 error generated.
Comment 1 Anders Carlsson 2013-09-25 11:18:17 PDT
Pretty sure this has been fixed now.