[LLVMbugs] [Bug 24223] New: Template parameter is undeclared identifier?

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 22 18:07:01 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24223

            Bug ID: 24223
           Summary: Template parameter is undeclared identifier?
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: paul_robinson at playstation.sony.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The following code:

class A {};
template<class TRAITS> void bar(void *p) {
  typedef typename TRAITS::cData *iter;
  iter it = (iter)p;
  (*it).TRAITS::cData::~cData(); // fails
}
struct B { typedef A cData; };
void foo (void *x) {
  bar<B>(x);
}

gets an error on the line marked with // fails

t.cpp:5:9: error: use of undeclared identifier 'TRAITS'
  (*it).TRAITS::cData::~cData(); // fails
        ^
t.cpp:9:3: note: in instantiation of function template
      specialization 'bar<B>' requested here
  bar<B>(x);
  ^
1 error generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150723/de29bab2/attachment.html>


More information about the llvm-bugs mailing list