https://bugs.llvm.org/show_bug.cgi?id=33235

            Bug ID: 33235
           Summary: clang-cl doesn't treat __declspec(nothrow) as
                    noexcept; fails to compile
           Product: clang
           Version: 4.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: sfi...@hotmail.com
                CC: llvm-bugs@lists.llvm.org

Created attachment 18543
  --> https://bugs.llvm.org/attachment.cgi?id=18543&action=edit
Self-contained test case

C:\Temp>type meow.cpp
struct Base {
    __declspec(nothrow) Base() { }
};

struct Derived : Base {
    Derived() noexcept = default;
};

int main() { }

C:\Temp>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.11.25326 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]

C:\Temp>cl /EHsc /nologo /W4 /std:c++latest meow.cpp
meow.cpp

C:\Temp>clang-cl -v
clang version 4.0.0 (tags/RELEASE_400/final)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: S:\WCFB01\vctools\NonShip\ClangLLVM\bin

C:\Temp>clang-cl /EHsc /nologo /W4 /std:c++latest meow.cpp
meow.cpp(6,5):  error: exception specification of explicitly defaulted default
constructor does not match the calculated one
    Derived() noexcept = default;
    ^
1 error generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to