[llvm-bugs] [Bug 47176] New: Crash parsing friend constexpr function with noexcept(true) specifier

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Aug 15 01:37:21 PDT 2020


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

            Bug ID: 47176
           Summary: Crash parsing friend constexpr function with
                    noexcept(true) specifier
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: code at extbit.io
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

Created attachment 23853
  --> https://bugs.llvm.org/attachment.cgi?id=23853&action=edit
Compilation command line and outputs/dumps

Got parsing bugs like:

1.      /Users/duzy/workspace/toolchain/source/extcxx/include/execution:4967:2:
current parser token ';'
2.      /Users/duzy/workspace/toolchain/source/extcxx/include/execution:869:1
<Spelling=/Users/duzy/workspace/.out/x86_64-unknown-darwin-gnu/building/include/c++/v1/__config:765:37>:
parsing namespace 'std'
3.      /Users/duzy/workspace/toolchain/source/extcxx/include/execution:869:1
<Spelling=/Users/duzy/workspace/.out/x86_64-unknown-darwin-gnu/building/include/c++/v1/__config:765:60>:
parsing namespace 'std::__extbit_1'
4.      /Users/duzy/workspace/toolchain/source/extcxx/include/execution:869:1
<Spelling=/Users/duzy/workspace/.out/x86_64-unknown-darwin-gnu/building/include/c++/v1/__config:780:71>:
parsing namespace 'std::__extbit_1::execution'
5.      /Users/duzy/workspace/toolchain/source/extcxx/include/execution:869:1
<Spelling=/Users/duzy/workspace/.out/x86_64-unknown-darwin-gnu/building/include/c++/v1/__config:780:100>:
parsing namespace 'std::__extbit_1::execution::v1'
6.     
/Users/duzy/workspace/toolchain/source/extcxx/include/execution:4958:35:
parsing struct/union/class body 'std::__extbit_1::execution::v1::crash_test'



While compiling code segment looks like this:

template <typename InnerProperty> struct crash_test
{
  template <typename Executor, typename Property>
  friend constexpr void crash(const Executor& ex, const crash_test<Property>&
p,
    enable_if_t<is_same_v<Property, InnerProperty> /*&& can_prefer_v<const
Executor&, const InnerProperty&>*/>* = 0)
    noexcept(/*is_nothrow_prefer<const Executor&, const
InnerProperty&>::value*/true)
  {
    return _VSTD::prefer(ex, p.property);
  }
};

-- 
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/20200815/b6eef52f/attachment.html>


More information about the llvm-bugs mailing list