[cfe-dev] C++ member methods defined inline in the class defintion

Sebastian Redl sebastian.redl at getdesigned.at
Wed May 13 00:44:46 PDT 2009


On Tue, 12 May 2009 23:03:01 -0400, Bradley Murray <bradtgmurray at gmail.com>
wrote:
> Hello,
> 
> I started playing with clang the other day and I realized it didn't
handle
> a
> fairly simple case.
> 
>     #include <stdio.h>
> 
>     class Test
>     {
>     public:
>         void TestingInlineMethod()
>         {
>             printf("TestingInlineMethod!\n");
>         }
>     };
> 
>     int main(int argc, char* argv[])
>     {
>         Test a;
>         a.TestingInlineMethod();
> 
>         return 0;
>     }
> 
> Compiling this code resulted in a linking error.

The state of C++ codegen is such that it's pretty futile to try anything
with it, Anders' efforts notwithstanding.

I'm just happy it actually gets to codegen.

Sebastian



More information about the cfe-dev mailing list