[cfe-dev] Can't resolve Sema::ActOnClassTemplate, clang-cc build fail

Sebastian Redl sebastian.redl at getdesigned.at
Sat Apr 18 09:26:07 PDT 2009


On Sat, 18 Apr 2009 16:54:25 +0800, ether zhhb <etherzhhb at gmail.com> wrote:
> I try to comment
> 
> Sema S(PP, Ctx, *Consumer, CompleteTranslationUnit);
> 
> in ParseAST.cpp at line 40 and change
> 
> Parser P(PP, S);
> 
> in ParseAST.cpp at line 41 to
> 
> Parser P(PP, *((Sema *)0));
> 
> and then build it, it could be build without error message.
> 
> It seem that something wrong in the constructor of Sema? but I can't
> see any reference to "ActOnClassTemplate" there.
> 

The only thing that's wrong is the MS compiler. I've looked into it, and
I'm quite certain it's a miscompilation. I generated the assembly listing
for ParseAST.cpp, and it indeed contains an external reference to the
mystery function, but there's no motivation for it. A search of the entire
source base reveals that ASTMultiPtr and ExternalASTSource never get within
a mile of each other.

I wonder ... perhaps a string hash being used incorrectly in the compiler?

Anyway, this is too absurd for me. I've tried changing the name of
ExternalASTSource, but it didn't help. I suggest you contact Microsoft
support.

Sebastian



More information about the cfe-dev mailing list