]> granicus.if.org Git - clang/commitdiff
[ASTMatchers] Fix build for VariadicFunction.
authorSamuel Benzaquen <sbenza@google.com>
Fri, 25 Mar 2016 17:46:02 +0000 (17:46 +0000)
committerSamuel Benzaquen <sbenza@google.com>
Fri, 25 Mar 2016 17:46:02 +0000 (17:46 +0000)
Under some conditions the implicit conversion from array to ArrayRef<>
is not working.
Fix the build by making it explicit.

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

include/clang/ASTMatchers/ASTMatchersInternal.h

index 185badb8dd2f2510f97cec3ebb31eaad8150d3b3..87ca05b0797e26d2603c5d11beaa9fbda8f5afd2 100644 (file)
@@ -90,7 +90,7 @@ private:
   // before we make the array.
   template <typename... ArgsT> ResultT Execute(const ArgsT &... Args) const {
     const ArgT *const ArgsArray[] = {&Args...};
-    return Func(ArgsArray);
+    return Func(ArrayRef<const ArgT *>(ArgsArray, sizeof...(ArgsT)));
   }
 };