title: Variadic template with type at end
body: <p>I'm trying to write a variadic function that will specialize on the last argument provided.</p>
  
  <pre><code>    // we take em all as long as they are convertible to string
      template&lt;typename... Args&gt;
      void warn(Args... args, string s){
          vector&lt;string&gt; joinable{args..., s};
          SMDiagnostic w(TUName, SourceMgr::DK_Warning,
                  util::join(joinable));
          w.print("CGD.so", errs());
      }
  
      template&lt;typename... Args&gt;
      void warn(Args... args, Value const * v){
          string buffer;
          raw_string_ostream os(buffer);
          v-&gt;print(os);
          warn(args..., os.str());
      }
  
      template&lt;typename... Args&gt;
      void warn(Args... args, CallInst const * ci){
          warn(args..., dyn_cast&lt;Value&gt;(ci));
      }
  </code></pre>
  
  <p>And i try to call them with</p>
  
  <pre><code>warn(me, someCallInst);
  </code></pre>
  
  <p>But clang gives me a weird errord</p>
  
  <pre><code>error: no matching member function for call to 'warn'
         warn("We found a function usage that is not a call!! Ignoring\n", inst);
         ^~~~
  ../llvm_opt_pass/cgd.cpp:1062:8: note: candidate function not viable: requires 1 argument, but 2 were provided
                  void warn(Args... args, CallInst const * ci){
                       ^
  ../llvm_opt_pass/cgd.cpp:1054:8: note: candidate function not viable: requires 1 argument, but 2 were provided
                  void warn(Args... args, Value const * v){
                       ^
  ../llvm_opt_pass/cgd.cpp:1046:8: note: candidate function not viable: requires 1 argument, but 2 were provided
                  void warn(Args... args, string s){
  </code></pre>
  
  <p>What do i have to do to be able to use the variadic template like that?</p>