<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Assertion with invalid exception specification"
href="https://bugs.llvm.org/show_bug.cgi?id=44514">44514</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion with invalid exception specification
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>aaron@aaronballman.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Given the following invalid code:
void f();
struct S {
void func(void) const & noexcept(f());
};
I get a failed assertion:
..\..\test.cpp:3:36: error: value of type 'void' is not contextually
convertible to 'bool'
void func(void) const & noexcept(f());
^~~
Assertion failed: TypeLoc::getFullDataSizeForType(Updated) ==
TypeLoc::getFullDataSizeForType(TSInfo->getType()) && "TypeLoc size mismatch
from updating exception specification", file
C:\llvm-project\clang\lib\AST\ASTContext.cpp, line 2970
Stack dump:
0. Program arguments: C:\CMakeBuilds\build\x64-Debug\bin\clang.exe -cc1
-ast-dump=json ..\..\test.cpp
1. <eof> parser at end of file
2. ..\..\test.cpp:2:1: parsing struct/union/class body 'S'
#0 0x00007ff7cd8ece9c HandleAbort
C:\llvm-project\llvm\lib\Support\Windows\Signals.inc:408:0
#1 0x00007fff9271c3e1 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x6c3e1)
#2 0x00007fff9271e039 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x6e039)
#3 0x00007fff92723c65 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x73c65)
#4 0x00007fff927237d7 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x737d7)
#5 0x00007fff92721841 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x71841)
#6 0x00007fff927241cf (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x741cf)
#7 0x00007ff7d2d97157 clang::ASTContext::adjustExceptionSpec(class
clang::FunctionDecl *, struct clang::FunctionProtoType::ExceptionSpecInfo const
&, bool) C:\llvm-project\clang\lib\AST\ASTContext.cpp:2968:0
#8 0x00007ff7d18d942d clang::Sema::actOnDelayedExceptionSpecification(class
clang::Decl *, enum clang::ExceptionSpecificationType, class
clang::SourceRange, class llvm::ArrayRef<class clang::OpaquePtr<class
clang::QualType>>, class llvm::ArrayRef<class clang::SourceRange>, class
clang::Expr *) C:\llvm-project\clang\lib\Sema\SemaDeclCXX.cpp:17289:0
#9 0x00007ff7d16788fb clang::Parser::ParseLexedMethodDeclaration(struct
clang::Parser::LateParsedMethodDeclaration &)
C:\llvm-project\clang\lib\Parse\ParseCXXInlineMethods.cpp:456:0
#10 0x00007ff7d1676af1
clang::Parser::LateParsedMethodDeclaration::ParseLexedMethodDeclarations(void)
C:\llvm-project\clang\lib\Parse\ParseCXXInlineMethods.cpp:253:0
#11 0x00007ff7d1677b4e clang::Parser::ParseLexedMethodDeclarations(struct
clang::Parser::ParsingClass &)
C:\llvm-project\clang\lib\Parse\ParseCXXInlineMethods.cpp:292:0
#12 0x00007ff7d16f00bb clang::Parser::ParseCXXMemberSpecification(class
clang::SourceLocation, class clang::SourceLocation, struct
clang::Parser::ParsedAttributesWithRange &, unsigned int, class clang::Decl *)
C:\llvm-project\clang\lib\Parse\ParseDeclCXX.cpp:3368:0
#13 0x00007ff7d16eea08 clang::Parser::ParseClassSpecifier(enum
clang::tok::TokenKind, class clang::SourceLocation, class clang::DeclSpec &,
struct clang::Parser::ParsedTemplateInfo const &, enum clang::AccessSpecifier,
bool, enum clang::Parser::DeclSpecContext, struct
clang::Parser::ParsedAttributesWithRange &)
C:\llvm-project\clang\lib\Parse\ParseDeclCXX.cpp:1959:0
#14 0x00007ff7d1635e09 clang::Parser::ParseDeclarationSpecifiers(class
clang::DeclSpec &, struct clang::Parser::ParsedTemplateInfo const &, enum
clang::AccessSpecifier, enum clang::Parser::DeclSpecContext, class
clang::Parser::LateParsedAttrList *)
C:\llvm-project\clang\lib\Parse\ParseDecl.cpp:3869:0
#15 0x00007ff7d15ee4a2 clang::Parser::ParseDeclOrFunctionDefInternal(struct
clang::Parser::ParsedAttributesWithRange &, class clang::ParsingDeclSpec &,
enum clang::AccessSpecifier) C:\llvm-project\clang\lib\Parse\Parser.cpp:1010:0
#16 0x00007ff7d15ee3b0
clang::Parser::ParseDeclarationOrFunctionDefinition(struct
clang::Parser::ParsedAttributesWithRange &, class clang::ParsingDeclSpec *,
enum clang::AccessSpecifier) C:\llvm-project\clang\lib\Parse\Parser.cpp:1115:0
#17 0x00007ff7d15eddd6 clang::Parser::ParseExternalDeclaration(struct
clang::Parser::ParsedAttributesWithRange &, class clang::ParsingDeclSpec *)
C:\llvm-project\clang\lib\Parse\Parser.cpp:935:0
#18 0x00007ff7d15e8aab clang::Parser::ParseTopLevelDecl(class
clang::OpaquePtr<class clang::DeclGroupRef> &, bool)
C:\llvm-project\clang\lib\Parse\Parser.cpp:686:0
#19 0x00007ff7d15e4a56 clang::ParseAST(class clang::Sema &, bool, bool)
C:\llvm-project\clang\lib\Parse\ParseAST.cpp:158:0
#20 0x00007ff7ceb0b76b clang::ASTFrontendAction::ExecuteAction(void)
C:\llvm-project\clang\lib\Frontend\FrontendAction.cpp:1045:0
#21 0x00007ff7ceb0b0fc clang::FrontendAction::Execute(void)
C:\llvm-project\clang\lib\Frontend\FrontendAction.cpp:940:0
#22 0x00007ff7cea7cef2 clang::CompilerInstance::ExecuteAction(class
clang::FrontendAction &)
C:\llvm-project\clang\lib\Frontend\CompilerInstance.cpp:965:0
#23 0x00007ff7cece0bb3 clang::ExecuteCompilerInvocation(class
clang::CompilerInstance *)
C:\llvm-project\clang\lib\FrontendTool\ExecuteCompilerInvocation.cpp:290:0
#24 0x00007ff7c9a6005b cc1_main(class llvm::ArrayRef<char const *>, char const
*, void *) C:\llvm-project\clang\tools\driver\cc1_main.cpp:239:0
#25 0x00007ff7c9a4b52d ExecuteCC1Tool
C:\llvm-project\clang\tools\driver\driver.cpp:309:0
#26 0x00007ff7c9a4bdf9 main C:\llvm-project\clang\tools\driver\driver.cpp:382:0
#27 0x00007ff7d3be9c09 invoke_main
d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79:0
#28 0x00007ff7d3be9aae __scrt_common_main_seh
d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288:0
#29 0x00007ff7d3be996e __scrt_common_main
d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331:0
#30 0x00007ff7d3be9c99 mainCRTStartup
d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17:0
#31 0x00007ffffc877bd4 (C:\WINDOWS\System32\KERNEL32.DLL+0x17bd4)
#32 0x00007ffffe66ced1 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x6ced1)
It seems like we should probably not be adjusting the exception specification
when it is invalid.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>