http://llvm.org/bugs/show_bug.cgi?id=17588

            Bug ID: 17588
           Summary: Forward Declaration of classes Within Namespaces
                    causes error
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Created attachment 11376
  --> http://llvm.org/bugs/attachment.cgi?id=11376&action=edit
Test code to reproduce the issue

The following code compiles with Clang bundled with Xcode 5.0 but produces an
error with Clang trunk:


#include <stdio.h>

namespace MyNamespace
{
    class MyClass
    {
    public:
        MyClass() { }
        ~MyClass() { }
    };
}

class MyNamespace::MyClass;

int main()
{
    fprintf(stderr, "Test code to reproduce an issue when compiling with Clang
trunk\n");
    return 0;
}


When compiling this file by performing the command
clang -o test test.cpp

you will see the error:

test.cpp:14:7: error: forward declaration of class cannot have a nested name
specifier
class MyNamespace::MyClass;

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to