]> granicus.if.org Git - clang/commitdiff
Use clang++-3.5 compatible initializer_list constructor
authorSerge Guelton <sguelton@quarkslab.com>
Wed, 10 May 2017 13:22:11 +0000 (13:22 +0000)
committerSerge Guelton <sguelton@quarkslab.com>
Wed, 10 May 2017 13:22:11 +0000 (13:22 +0000)
Otherwise, a warning is issued.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302654 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Checkers/SelectorExtras.h

index a52f2c514b2713773e33ab696f6298fe11f3011a..b11d070c629b492a39ce8e351e8f5dd4d114d63c 100644 (file)
@@ -20,7 +20,7 @@ static inline Selector getKeywordSelector(ASTContext &Ctx,
                                           IdentifierInfos *... IIs) {
   static_assert(sizeof...(IdentifierInfos),
                 "keyword selectors must have at least one argument");
-  SmallVector<IdentifierInfo *, 10> II{{&Ctx.Idents.get(IIs)...}};
+  SmallVector<IdentifierInfo *, 10> II({&Ctx.Idents.get(IIs)...});
 
   return Ctx.Selectors.getSelector(II.size(), &II[0]);
 }