<html>
    <head>
      <base href="http://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 --- - Missing diagnose: declaration of 'T' shadows template parameter"
   href="http://llvm.org/bugs/show_bug.cgi?id=17592">17592</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Missing diagnose: declaration of 'T' shadows template parameter
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>C++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>zhaoshiz@codeaurora.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu, richard-llvm@metafoo.co.uk
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Please consider reopen bug-8302

$ cat test.cpp 
template <class T> struct S {
  void foo() {
    void T(void);
  }
};

S<int> s;
void  goo() { s.foo(); }


CLANG:

$ clang++ -target arm-none-linux-gnueabi -mfloat-abi=softfp -mfpu=neon
--sysroot=~/build_tools/gcc-4.6.1-cs/arm-2011.09 test.cpp -c -o test.o

G++:

$ arm-none-linux-gnueabi-g++ -mcpu=cortex-a9 test.cpp -c -o test.o
test.cpp: In member function 'void S<T>::foo()':
test.cpp:3:10: error: declaration of 'void T()'
test.cpp:1:11: error:  shadows template parm 'class T'

Seems to related to commit:

commit dd9459f8869f66409f7ea429053b453e33f6499c
    Author: Richard Smith <<a href="mailto:richard-llvm@metafoo.co.uk">richard-llvm@metafoo.co.uk</a>>
    Date:   Tue Aug 13 18:18:50 2013 +0000

        Fix implementation of C11 6.2.7/4 and C++11 [dcl.array]p3:

        When a local extern declaration redeclares some other entity, the type
of that
        entity is merged with the prior type if the prior declaration is
visible (in C)
        or is declared in the same scope (in C++).

         - Make LookupRedeclarationWithLinkage actually work in C++, use it in
the right
           set of cases, and make it track whether it found a shadowed
declaration.
         - Track whether we found a declaration in the same scope (for C++)
including
           across serialization and template instantiation.

        git-svn-id: <a href="https://llvm.org/svn/llvm-project/cfe/trunk@188307">https://llvm.org/svn/llvm-project/cfe/trunk@188307</a>
91177308-0d34-0410-b5e6-96231b3b80d8</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>