Bug 192617

Summary: [Win][Clang][WebKitLegacy] warning: expected a qualified name after 'typename' of COMEnumVariant and COMPropertyBag
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: WebKit Misc.Assignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, pvollan, ross.kirsling, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 171618    
Attachments:
Description Flags
Patch none

Description Fujii Hironori 2018-12-11 23:48:13 PST
[Win][Clang][WebKitLegacy] warning: expected a qualified name after 'typename' of COMEnumVariant and COMPropertyBag

clang-cl reports the following compilation warnings:

> [5841/6308] Building CXX object Source\WebKitLegacy\CMakeFiles\WebKitLegacy.dir\win\WebDatabaseManager.cpp.obj
> In file included from ..\..\Source\WebKitLegacy\win\WebDatabaseManager.cpp:32:
> ..\..\Source\WebKitLegacy\win/COMEnumVariant.h(72,25):  warning: expected a qualified name after 'typename'
> COMEnumVariant<typename ContainerType>* COMEnumVariant<ContainerType>::adopt(ContainerType& container) 
>                         ^
> ..\..\Source\WebKitLegacy\win/COMEnumVariant.h(82,25):  warning: expected a qualified name after 'typename'
> COMEnumVariant<typename ContainerType>* COMEnumVariant<ContainerType>::createInstance(const ContainerType& container)
>                         ^
> In file included from ..\..\Source\WebKitLegacy\win\WebDatabaseManager.cpp:33:
> ..\..\Source\WebKitLegacy\win/COMPropertyBag.h(80,71):  warning: expected a qualified name after 'typename'
> COMPropertyBag<ValueType, KeyType, HashType>* COMPropertyBag<typename ValueType, typename KeyType, HashType>::createInstance(const HashMapType& hashMap)
>                                                                       ^
> ..\..\Source\WebKitLegacy\win/COMPropertyBag.h(80,91):  warning: expected a qualified name after 'typename'
> COMPropertyBag<ValueType, KeyType, HashType>* COMPropertyBag<typename ValueType, typename KeyType, HashType>::createInstance(const HashMapType& hashMap)
>                                                                                           ^
> ..\..\Source\WebKitLegacy\win/COMPropertyBag.h(88,71):  warning: expected a qualified name after 'typename'
> COMPropertyBag<ValueType, KeyType, HashType>* COMPropertyBag<typename ValueType, typename KeyType, HashType>::adopt(HashMapType& hashMap)
>                                                                       ^
> ..\..\Source\WebKitLegacy\win/COMPropertyBag.h(88,91):  warning: expected a qualified name after 'typename'
> COMPropertyBag<ValueType, KeyType, HashType>* COMPropertyBag<typename ValueType, typename KeyType, HashType>::adopt(HashMapType& hashMap)
>                                                                                           ^
Comment 1 Fujii Hironori 2018-12-11 23:57:05 PST
Created attachment 357111 [details]
Patch
Comment 2 Fujii Hironori 2018-12-12 00:17:40 PST
This patch fixes the following warning, too.

> In file included from ..\..\Source\WebKitLegacy\win\WebCoreSupport\WebFrameLoaderClient.cpp:32:
> ..\..\Source\WebKitLegacy\win\COMPropertyBag.h(140,5):  warning: missing 'typename' prior to dependent type name 'HashMapType::const_iterator' [-Wtypename-missing]
>     HashMapType::const_iterator it = m_hashMap.find(String(pszPropName));
>     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>     typename 
> ..\..\Source\WebKitLegacy\win\COMPropertyBag.h(82,36):  note: in instantiation of member function 'COMPropertyBag<WTF::String, WTF::String, WTF::StringHash>::COMPropertyBag' requested here
>     COMPropertyBag* instance = new COMPropertyBag(hashMap);
>                                    ^
> ..\..\Source\WebKitLegacy\win\WebCoreSupport\WebFrameLoaderClient.cpp(624,82):  note: in instantiation of member function 'COMPropertyBag<WTF::String, WTF::String, WTF::StringHash>::createInstance' requested here
>     COMPtr<IPropertyBag> formValuesPropertyBag(AdoptCOM, COMPropertyBag<String>::createInstance(formValuesMap));
>                                                                                  ^
Comment 3 Ross Kirsling 2018-12-12 17:44:30 PST
LGTM.
Comment 4 Fujii Hironori 2018-12-12 22:59:58 PST
Comment on attachment 357111 [details]
Patch

Committed in r239152: https://trac.webkit.org/changeset/239152/
Comment 5 Radar WebKit Bug Importer 2018-12-12 23:01:35 PST
<rdar://problem/46688436>