Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: cannot mangle this template type parameter type yet #61440

Closed
steeeeeeleydan opened this issue Mar 15, 2023 · 3 comments
Closed

error: cannot mangle this template type parameter type yet #61440

steeeeeeleydan opened this issue Mar 15, 2023 · 3 comments
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party crash Prefer [crash-on-valid] or [crash-on-invalid] platform:windows

Comments

@steeeeeeleydan
Copy link

steeeeeeleydan commented Mar 15, 2023

While attempting to generate AST with Clang 15.0.7 with code that includes headers from MSVC 17.3.5, Clang crashes.

Attached is a zip file containing:

  1. main.cpp, a small program that can generate the Clang crash
  2. build.bat, shows the command line used on my system to generate the crash
  3. err, output generated from running build.bat on my system
  4. msvc-17.3.5, copies of the entire source files from which main.cpp was pieced together, included here for context (if necessary)

Below is the stack dump generated from the crash, pasted here for convenience:

Stack dump:
0.	Program arguments: "c:\\Program Files\\LLVM\\15.0.7\\bin\\clang.exe" -v -c -Xclang -ast-dump=json main.cpp
1.	<eof> parser at end of file
2.	main.cpp:55:27: Mangling declaration '_Is_member_object_pointer<type-parameter-0-0 type-parameter-0-1::*>::value'
Exception Code: 0xC0000005
 #0 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2bd418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2bde0c6
 #1 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2bd9086 c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2bd62b3
 #2 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2bd5ce8 c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2bd3b12
 #3 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2bd2b70 c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2bce1f5
 #4 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x283b516 c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x283d58e
 #5 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x283ca83 c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x283cbd9
 #6 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x380c54f c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x380cf03
 #7 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x3803c1c c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2b7e652
 #8 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2b8c956 c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2b7e516
 #9 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2b7e836 c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2b8c956
#10 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2b7e516 c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2b7e836
#11 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2b7e1b0 c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x2b72bcc
#12 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x3190716 c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x319050d
#13 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x313e09e c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x1a46d02
#14 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x7d580d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x866e9e
#15 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x7b1b c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x4a73
#16 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x1827bd6 c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x66a78f
#17 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x182795b c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x792d15
#18 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x79305d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x7ad0fc
#19 0x00007ff6c5da418d c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x438f c:\Program Files\LLVM\15.0.7\bin\clang.exe 0x41ea770
#20 0x00007ff6c5da418d (c:\Program Files\LLVM\15.0.7\bin\clang.exe+0x2bd418d)
#21 0x00007ff6c5dae0c6 (c:\Program Files\LLVM\15.0.7\bin\clang.exe+0x2bde0c6)
0x00007FF6C5DA418D, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2BD418D byte(s)
0x00007FF6C5DAE0C6, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2BDE0C6 byte(s)
0x00007FF6C5DA9086, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2BD9086 byte(s)
0x00007FF6C5DA62B3, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2BD62B3 byte(s)
0x00007FF6C5DA5CE8, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2BD5CE8 byte(s)
0x00007FF6C5DA3B12, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2BD3B12 byte(s)
0x00007FF6C5DA2B70, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2BD2B70 byte(s)
0x00007FF6C5D9E1F5, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2BCE1F5 byte(s)
0x00007FF6C5A0B516, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x283B516 byte(s)
0x00007FF6C5A0D58E, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x283D58E byte(s)
0x00007FF6C5A0CA83, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x283CA83 byte(s)
0x00007FF6C5A0CBD9, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x283CBD9 byte(s)
0x00007FF6C69DC54F, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x380C54F byte(s)
0x00007FF6C69DCF03, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x380CF03 byte(s)
0x00007FF6C69D3C1C, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x3803C1C byte(s)
0x00007FF6C5D4E652, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2B7E652 byte(s)
0x00007FF6C5D5C956, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2B8C956 byte(s)
0x00007FF6C5D4E516, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2B7E516 byte(s)
0x00007FF6C5D4E836, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2B7E836 byte(s)
0x00007FF6C5D5C956, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2B8C956 byte(s)
0x00007FF6C5D4E516, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2B7E516 byte(s)
0x00007FF6C5D4E836, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2B7E836 byte(s)
0x00007FF6C5D4E1B0, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2B7E1B0 byte(s)
0x00007FF6C5D42BCC, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x2B72BCC byte(s)
0x00007FF6C6360716, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x3190716 byte(s)
0x00007FF6C636050D, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x319050D byte(s)
0x00007FF6C630E09E, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x313E09E byte(s)
0x00007FF6C4C16D02, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x1A46D02 byte(s)
0x00007FF6C39A580D, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x7D580D byte(s)
0x00007FF6C3A36E9E, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x866E9E byte(s)
0x00007FF6C31D7B1B, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x7B1B byte(s)
0x00007FF6C31D4A73, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x4A73 byte(s)
0x00007FF6C49F7BD6, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x1827BD6 byte(s)
0x00007FF6C383A78F, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x66A78F byte(s)
0x00007FF6C49F795B, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x182795B byte(s)
0x00007FF6C3962D15, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x792D15 byte(s)
0x00007FF6C396305D, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x79305D byte(s)
0x00007FF6C397D0FC, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x7AD0FC byte(s)
0x00007FF6C31D438F, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x438F byte(s)
0x00007FF6C73BA770, c:\Program Files\LLVM\15.0.7\bin\clang.exe(0x00007FF6C31D0000) + 0x41EA770 byte(s)
0x00007FFCFAED7614, C:\Windows\System32\KERNEL32.DLL(0x00007FFCFAEC0000) + 0x17614 byte(s)
0x00007FFCFC4026A1, C:\Windows\SYSTEM32\ntdll.dll(0x00007FFCFC3B0000) + 0x526A1 byte(s), RtlUserThreadStart() + 0x21 byte(s)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 15.0.7
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: c:\Program Files\LLVM\15.0.7\bin
clang: note: diagnostic msg: Error generating preprocessed source(s).

package.zip

@EugeneZelenko EugeneZelenko added clang Clang issues not falling into any other category platform:windows crash Prefer [crash-on-valid] or [crash-on-invalid] and removed new issue labels Mar 15, 2023
@AaronBallman AaronBallman added the confirmed Verified by a second party label Apr 6, 2023
@AaronBallman
Copy link
Collaborator

It's a failing assertion, here's more details:

          "name": "value"Assertion failed: isa<To>(Val) && "cast<Ty>() argument of incompatible type!", file F:\source\llvm-project\llvm\include\llvm/Support/Casting.h, line 567
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: llvm\\out\\build\\x64-Debug\\bin\\clang.exe -cc1 -ast-dump=json "c:\\Users\\aballman\\OneDrive - Intel Corporation\\Desktop\\test.cpp"
1.      <eof> parser at end of file
2.      c:\Users\aballman\OneDrive - Intel Corporation\Desktop\test.cpp:55:27: Mangling declaration '_Is_member_object_pointer<type-parameter-0-0 type-parameter-0-1::*>::value'
Exception Code: 0x80000003
 #0 0x00007ff6af8a781c HandleAbort F:\source\llvm-project\llvm\lib\Support\Windows\Signals.inc:419:0
 #1 0x00007ff8e422bc31 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x6bc31)
 #2 0x00007ff8e422d889 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x6d889)
 #3 0x00007ff8e42334b5 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x734b5)
 #4 0x00007ff8e4233027 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x73027)
 #5 0x00007ff8e4231091 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x71091)
 #6 0x00007ff8e4233a1f (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x73a1f)
 #7 0x00007ff6aff02fa1 F:\source\llvm-project\llvm\include\llvm\Support\Casting.h:567:0
 #8 0x00007ff6aff0369b clang::Type::castAs<class clang::RecordType>(void) const F:\source\llvm-project\llvm\out\build\x64-Debug\tools\clang\include\clang\AST\TypeNodes.inc:90:0
 #9 0x00007ff6b7cdba60 `anonymous namespace'::MicrosoftCXXNameMangler::mangleType F:\source\llvm-project\clang\lib\AST\MicrosoftMangle.cpp:2974:0
#10 0x00007ff6b7cd2ea2 `anonymous namespace'::MicrosoftCXXNameMangler::mangleType F:\source\llvm-project\llvm\out\build\x64-Debug\tools\clang\include\clang\AST\TypeNodes.inc:54:0
#11 0x00007ff6b7cde905 `anonymous namespace'::MicrosoftCXXNameMangler::mangleTemplateArg F:\source\llvm-project\clang\lib\AST\MicrosoftMangle.cpp:1594:0
#12 0x00007ff6b7cde7c9 `anonymous namespace'::MicrosoftCXXNameMangler::mangleTemplateArgs F:\source\llvm-project\clang\lib\AST\MicrosoftMangle.cpp:1547:0
#13 0x00007ff6b7cd76f5 `anonymous namespace'::MicrosoftCXXNameMangler::mangleTemplateInstantiationName F:\source\llvm-project\clang\lib\AST\MicrosoftMangle.cpp:1481:0
#14 0x00007ff6b7cd4d46 `anonymous namespace'::MicrosoftCXXNameMangler::mangleUnqualifiedName F:\source\llvm-project\clang\lib\AST\MicrosoftMangle.cpp:951:0
#15 0x00007ff6b7cd4a96 `anonymous namespace'::MicrosoftCXXNameMangler::mangleUnqualifiedName F:\source\llvm-project\clang\lib\AST\MicrosoftMangle.cpp:406:0
#16 0x00007ff6b7cd48c0 `anonymous namespace'::MicrosoftCXXNameMangler::mangleNestedName F:\source\llvm-project\clang\lib\AST\MicrosoftMangle.cpp:1279:0
#17 0x00007ff6b7cd0326 `anonymous namespace'::MicrosoftCXXNameMangler::mangleName F:\source\llvm-project\clang\lib\AST\MicrosoftMangle.cpp:802:0
#18 0x00007ff6b7cd0181 `anonymous namespace'::MicrosoftCXXNameMangler::mangle F:\source\llvm-project\clang\lib\AST\MicrosoftMangle.cpp:565:0
#19 0x00007ff6b7ccc44b `anonymous namespace'::MicrosoftMangleContextImpl::mangleCXXName F:\source\llvm-project\clang\lib\AST\MicrosoftMangle.cpp:3395:0
#20 0x00007ff6b7876413 clang::MangleContext::mangleName(class clang::GlobalDecl, class llvm::raw_ostream &) F:\source\llvm-project\clang\lib\AST\Mangle.cpp:193:0
#21 0x00007ff6b787a2c3 clang::ASTNameGenerator::Implementation::writeFuncOrVarName(class clang::NamedDecl const *, class llvm::raw_ostream &) F:\source\llvm-project\clang\lib\AST\Mangle.cpp:535:0
#22 0x00007ff6b787a55b clang::ASTNameGenerator::Implementation::writeName(class clang::Decl const *, class llvm::raw_ostream &) F:\source\llvm-project\clang\lib\AST\Mangle.cpp:411:0
#23 0x00007ff6b787a001 clang::ASTNameGenerator::Implementation::getName(class clang::Decl const *) F:\source\llvm-project\clang\lib\AST\Mangle.cpp:433:0
#24 0x00007ff6b787786a clang::ASTNameGenerator::getName(class clang::Decl const *) F:\source\llvm-project\clang\lib\AST\Mangle.cpp:594:0
#25 0x00007ff6b7d78258 clang::JSONNodeDumper::VisitNamedDecl(class clang::NamedDecl const *) F:\source\llvm-project\clang\lib\AST\JSONNodeDumper.cpp:780:0
#26 0x00007ff6b7d78d8a clang::JSONNodeDumper::VisitVarDecl(class clang::VarDecl const *) F:\source\llvm-project\clang\lib\AST\JSONNodeDumper.cpp:835:0
#27 0x00007ff6b7d97aff clang::declvisitor::Base<struct llvm::make_const_ptr, class clang::JSONNodeDumper, void>::Visit(class clang::Decl const *) F:\source\llvm-project\llvm\out\build\x64-Debug\tools\clang\include\clang\AST\DeclNodes.inc:485:0
#28 0x00007ff6b7d7329c clang::JSONNodeDumper::Visit(class clang::Decl const *) F:\source\llvm-project\clang\lib\AST\JSONNodeDumper.cpp:131:0
#29 0x00007ff6b78e23e7 `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>::operator()(void) const F:\source\llvm-project\clang\include\clang\AST\ASTNodeTraverser.h:94:0
#30 0x00007ff6b78de90a `public: void __cdecl clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class llvm::StringRef, class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>)'::`2'::<lambda_1>::operator()(bool) const F:\source\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:86:0
#31 0x00007ff6b78d12a1 std::invoke<class `public: void __cdecl clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class llvm::StringRef, class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>)'::`2'::<lambda_1> &, bool>(class `public: void __cdecl clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class llvm::StringRef, class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>)'::`2'::<lambda_1> &, bool &&) C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\type_traits:1589:0
#32 0x00007ff6b78ca20e std::_Invoker_ret<void>::_Call<class `public: void __cdecl clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class llvm::StringRef, class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>)'::`2'::<lambda_1> &, bool>(class `public: void __cdecl clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class llvm::StringRef, class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>)'::`2'::<lambda_1> &, bool &&) C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\functional:674:0
#33 0x00007ff6b7943d35 std::_Func_impl_no_alloc<class `public: void __cdecl clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class llvm::StringRef, class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>)'::`2'::<lambda_1>, void, bool>::_Do_call(bool &&) C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\functional:834:0
#34 0x00007ff6b78e36c2 std::_Func_class<void, bool>::operator()(bool) const C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\functional:875:0
#35 0x00007ff6b78c5a36 clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class llvm::StringRef, class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>) F:\source\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:103:0
#36 0x00007ff6b78c578c clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>) F:\source\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:45:0
#37 0x00007ff6b78e50dc clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *) F:\source\llvm-project\clang\include\clang\AST\ASTNodeTraverser.h:120:0
#38 0x00007ff6b7948813 clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::dumpDeclContext(class clang::DeclContext const *) F:\source\llvm-project\clang\include\clang\AST\ASTNodeTraverser.h:298:0
#39 0x00007ff6b78e2618 `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>::operator()(void) const F:\source\llvm-project\clang\include\clang\AST\ASTNodeTraverser.h:119:0
#40 0x00007ff6b78de90a `public: void __cdecl clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class llvm::StringRef, class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>)'::`2'::<lambda_1>::operator()(bool) const F:\source\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:86:0
#41 0x00007ff6b78d12a1 std::invoke<class `public: void __cdecl clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class llvm::StringRef, class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>)'::`2'::<lambda_1> &, bool>(class `public: void __cdecl clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class llvm::StringRef, class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>)'::`2'::<lambda_1> &, bool &&) C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\type_traits:1589:0
#42 0x00007ff6b78ca20e std::_Invoker_ret<void>::_Call<class `public: void __cdecl clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class llvm::StringRef, class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>)'::`2'::<lambda_1> &, bool>(class `public: void __cdecl clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class llvm::StringRef, class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>)'::`2'::<lambda_1> &, bool &&) C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\functional:674:0
#43 0x00007ff6b7943d35 std::_Func_impl_no_alloc<class `public: void __cdecl clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class llvm::StringRef, class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>)'::`2'::<lambda_1>, void, bool>::_Do_call(bool &&) C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\functional:834:0
#44 0x00007ff6b78e36c2 std::_Func_class<void, bool>::operator()(bool) const C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include\functional:875:0
#45 0x00007ff6b78c5a36 clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class llvm::StringRef, class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>) F:\source\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:103:0
#46 0x00007ff6b78c578c clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>) F:\source\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:45:0
#47 0x00007ff6b78e50dc clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *) F:\source\llvm-project\clang\include\clang\AST\ASTNodeTraverser.h:120:0
#48 0x00007ff6b7948813 clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::dumpDeclContext(class clang::DeclContext const *) F:\source\llvm-project\clang\include\clang\AST\ASTNodeTraverser.h:298:0
#49 0x00007ff6b78e2618 `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>::operator()(void) const F:\source\llvm-project\clang\include\clang\AST\ASTNodeTraverser.h:119:0
#50 0x00007ff6b78c5846 clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class llvm::StringRef, class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>) F:\source\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:58:0
#51 0x00007ff6b78c578c clang::NodeStreamer::AddChild<class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>>(class `public: void __cdecl clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *)'::`2'::<lambda_1>) F:\source\llvm-project\clang\include\clang\AST\JSONNodeDumper.h:45:0
#52 0x00007ff6b78e50dc clang::ASTNodeTraverser<class clang::JSONDumper, class clang::JSONNodeDumper>::Visit(class clang::Decl const *) F:\source\llvm-project\clang\include\clang\AST\ASTNodeTraverser.h:120:0
#53 0x00007ff6b78b82c4 clang::Decl::dump(class llvm::raw_ostream &, bool, enum clang::ASTDumpOutputFormat) const F:\source\llvm-project\clang\lib\AST\ASTDumper.cpp:218:0
#54 0x00007ff6b1222b1e `anonymous namespace'::ASTPrinter::print F:\source\llvm-project\clang\lib\Frontend\ASTConsumers.cpp:101:0
#55 0x00007ff6b1222545 `anonymous namespace'::ASTPrinter::HandleTranslationUnit F:\source\llvm-project\clang\lib\Frontend\ASTConsumers.cpp:48:0
#56 0x00007ff6b4c2a57b clang::ParseAST(class clang::Sema &, bool, bool) F:\source\llvm-project\clang\lib\Parse\ParseAST.cpp:182:0
#57 0x00007ff6b11631ba clang::ASTFrontendAction::ExecuteAction(void) F:\source\llvm-project\clang\lib\Frontend\FrontendAction.cpp:1170:0
#58 0x00007ff6b1162ace clang::FrontendAction::Execute(void) F:\source\llvm-project\clang\lib\Frontend\FrontendAction.cpp:1062:0
#59 0x00007ff6b10da4f8 clang::CompilerInstance::ExecuteAction(class clang::FrontendAction &) F:\source\llvm-project\clang\lib\Frontend\CompilerInstance.cpp:1048:0
#60 0x00007ff6b13a5d90 clang::ExecuteCompilerInvocation(class clang::CompilerInstance *) F:\source\llvm-project\clang\lib\FrontendTool\ExecuteCompilerInvocation.cpp:264:0
#61 0x00007ff6ad046d14 cc1_main(class llvm::ArrayRef<char const *>, char const *, void *) F:\source\llvm-project\clang\tools\driver\cc1_main.cpp:251:0
#62 0x00007ff6ad0283db ExecuteCC1Tool F:\source\llvm-project\clang\tools\driver\driver.cpp:366:0
#63 0x00007ff6ad028c29 clang_main(int, char **, struct llvm::ToolContext const &) F:\source\llvm-project\clang\tools\driver\driver.cpp:407:0
#64 0x00007ff6ad075156 main F:\source\llvm-project\llvm\out\build\x64-Debug\tools\clang\tools\driver\clang-driver.cpp:16:0
#65 0x00007ff6b8942189 invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79:0
#66 0x00007ff6b894202e __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288:0
#67 0x00007ff6b8941eee __scrt_common_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331:0
#68 0x00007ff6b894221e mainCRTStartup D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17:0
#69 0x00007ff93d737614 (C:\WINDOWS\System32\KERNEL32.DLL+0x17614)
#70 0x00007ff93d8826a1 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x526a1)

@EugeneZelenko EugeneZelenko added clang:codegen IR generation bugs: mangling, exceptions, etc. and removed clang Clang issues not falling into any other category labels Apr 6, 2023
@llvmbot
Copy link
Member

llvmbot commented Apr 6, 2023

@llvm/issue-subscribers-clang-codegen

@EugeneZelenko EugeneZelenko added clang:frontend Language frontend issues, e.g. anything involving "Sema" and removed clang:codegen IR generation bugs: mangling, exceptions, etc. labels Apr 6, 2023
@llvmbot
Copy link
Member

llvmbot commented Apr 6, 2023

@llvm/issue-subscribers-clang-frontend

gysit pushed a commit to nextsilicon/llvm-project that referenced this issue Apr 27, 2023
We were trying to mangle templated names and the Microsoft mangler does
not have an implementation for mangling dependent names. Instead, we
now skip trying to print the mangled name if the AST node is still a
templated node rather than a fully resolved node.

Fixes llvm#61440
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party crash Prefer [crash-on-valid] or [crash-on-invalid] platform:windows
Projects
None yet
Development

No branches or pull requests

4 participants