[cfe-dev] Problem with canonical types?

Abramo Bagnara abramo.bagnara at gmail.com
Tue Jul 27 02:48:15 PDT 2010


When compiling the attached example using clang, we get the following error:

====================
$ llvm/Debug+Asserts/bin/clang -cc1 -fsyntax-only ppl_bug.cc
ppl_bug.cc:32:11: error: out-of-line definition of 'foo' does not match
any declaration in 'Class<T>'
Class<T>::foo() {}
~~~~~~~~~~^
1 error generated.
====================


We tracked down the problem up to the call to

bool Sema::IsOverload(FunctionDecl *New, FunctionDecl *Old,
                      bool UseUsingDeclRules);

where the test

    OldType->getResultType() != NewType->getResultType()

succeeds instead of failing.

The two (canonical) result types do print the same (using method dump()
in gdb), but they are anyway different pointers.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ppl_bug.cc
Type: text/x-c++src
Size: 676 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100727/0585c8d7/attachment.cc>


More information about the cfe-dev mailing list