<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - error: 'C' following the 'template' keyword does not refer to a template"
   href="https://llvm.org/bugs/show_bug.cgi?id=27118">27118</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>error: 'C' following the 'template' keyword does not refer to a template
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.8
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jtony@ca.ibm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The following reduced test case compiles successfully with g++ while clang
issues error message.

-bash-4.2$ cat reduce.cpp
template<typename T>
struct F { };

template<template<typename> class C>
struct S {
  ~S() {
    C<int>().C<int>::~C<int>();
  }
};

S<F> s ;


-bash-4.2$ ~/build/runnable/bin/clang++ reduce.cpp -c -v
clang version 3.8.0 (tags/RELEASE_380/final)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jtony/build/runnable/bin
Found candidate GCC installation: /usr/lib/gcc/ppc64le-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/ppc64le-redhat-linux/4.8.3
Selected GCC installation: /usr/lib/gcc/ppc64le-redhat-linux/4.8.3
Candidate multilib: .;@m64
Selected multilib: .;@m64
 "/home/jtony/build/runnable/bin/clang" -cc1 -triple
powerpc64le-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -main-file-name reduce.cpp -mrelocation-model static
-mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -fuse-init-array -target-cpu ppc64le -mfloat-abi hard
-target-abi elfv2 -target-linker-version 2.23.52.0.1 -v -dwarf-column-info
-debugger-tuning=gdb -coverage-file
/gsa/tlbgsa/home/j/t/jtony/workitems/127037/reduce.cpp -resource-dir
/home/jtony/build/runnable/bin/../lib/clang/3.8.0 -internal-isystem
/usr/lib/gcc/ppc64le-redhat-linux/4.8.3/../../../../include/c++/4.8.3
-internal-isystem
/usr/lib/gcc/ppc64le-redhat-linux/4.8.3/../../../../include/c++/4.8.3/ppc64le-redhat-linux
-internal-isystem
/usr/lib/gcc/ppc64le-redhat-linux/4.8.3/../../../../include/c++/4.8.3/backward
-internal-isystem /usr/local/include -internal-isystem
/home/jtony/build/runnable/bin/../lib/clang/3.8.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdeprecated-macro -fdebug-compilation-dir
/gsa/tlbgsa/home/j/t/jtony/workitems/127037 -ferror-limit 19 -fmessage-length
135 -fno-signed-char -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -o reduce.o -x c++ reduce.cpp
clang -cc1 version 3.8.0 based upon LLVM 3.8.0 default target
powerpc64le-unknown-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/ppc64le-redhat-linux/4.8.3/../../../../include/c++/4.8.3

/usr/lib/gcc/ppc64le-redhat-linux/4.8.3/../../../../include/c++/4.8.3/ppc64le-redhat-linux
 /usr/lib/gcc/ppc64le-redhat-linux/4.8.3/../../../../include/c++/4.8.3/backward
 /usr/local/include
 /home/jtony/build/runnable/bin/../lib/clang/3.8.0/include
 /usr/include
End of search list.
reduce.cpp:7:23: error: 'C' following the 'template' keyword does not refer to
a template
    C<int>().C<int>::~C<int>();
                      ^
reduce.cpp:11:6: note: in instantiation of member function 'S<F>::~S' requested
here



-bash-4.2$ g++ reduce.cpp -c
-bash-4.2$</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>