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

            Bug ID: 43628
           Summary: Clang crashes if __private_extern__ is undef'd and
                    used in C++
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

Compile this C++ code:

#undef __private_extern__
struct ABC {
  static double a;
};
__private_extern__ double ABC::a = 1.0;

This crashes at SemaDecl.cpp:6649 saying:

$ clang -c t.cpp
C storage class in c++!
UNREACHABLE executed at C:\src\llvm-project\clang\lib\Sema\SemaDecl.cpp:6649!

See also https://bugs.llvm.org/show_bug.cgi?id=9375, where I guess a user
wanted us to restrict this extension to MachO platforms.

Noticed while working on https://reviews.llvm.org/D68055.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to