[llvm-bugs] [Bug 33235] New: clang-cl doesn't treat __declspec(nothrow) as noexcept; fails to compile

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 30 15:25:32 PDT 2017


            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: unassignedclangbugs at nondot.org
          Reporter: sfinae at hotmail.com
                CC: llvm-bugs at 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() { }

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

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170530/362344af/attachment.html>

More information about the llvm-bugs mailing list