Skip to content

[ms] clang fails to compile sample Aero from WTL #27322

@llvmbot

Description

@llvmbot
Bugzilla Link 26948
Version trunk
OS Windows NT
Reporter LLVM Bugzilla Contributor
CC @DougGregor

Extended Description

!- compilation of WTL example WTL/Aero fails with clang. MS can compile the whole project without any errors.
These three problems also appears during compilation of this sample:
26735
26738
26748 -!

========Environment==============
Os: Win
Language: C++
Version: trunk

========Reproducer================

  1. Download WTL from here: https://sourceforge.net/projects/wtl/ to [WTL_HOME]
  2. Goto [WTL_HOME]/Samples/Aero
  3. clang-cl -c -D_UNICODE -I ../../include Aero.cpp

========Small Reproducer==========

template <class T>
class CAeroImpl{
public:
        CAeroImpl() {}
};

template <class T>
class CAeroDialogImpl : public CAeroImpl<T>{
public:
        CAeroDialogImpl() : CAeroImpl() {}
};

class CAboutDlg : public CAeroDialogImpl<CAboutDlg>{
public:
        int OnCloseCmd() {}
};

class CMainFrame{
public:
        int OnAppAbout(){
                CAboutDlg dlg;
                return 0;
        }
};

=============Error==================

>>> clang: 
error: member initializer 'CAeroImpl' does not name a non-static data member or base class

>>> msvc: no diag

>>> gcc: 
error: class ‘CAeroDialogImpl<T>’ does not have any field named
           CAeroDialogImpl() : CAeroImpl() {}

Andrey Kuleshov

Software Engineer
Intel Compiler Team

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions