https://github.com/AaronBallman commented:

We've got some other bugs in this area btw because when I try your changes 
locally, I get crashes unless I set the command line almost exactly the same as 
what you have in the RUN lines:
```
F:\source\llvm-project>llvm\out\build\x64-Debug\bin\clang.exe -cc1 -x 
objective-c -fsyntax-only -fobjc-constant-literals -fconstant-nsnumber-literals 
-fconstant-nsarray-literals -fconstant-nsdictionary-literals -fobjc-arc 
"C:\Users\aballman\OneDrive - Intel Corporation\Desktop\test.c"
Assertion failed: LangOpts.ObjCRuntime.hasConstantCFBooleans() && "The current 
ABI doesn't support the constant CFBooleanTrue " "singleton!", file 
F:\source\llvm-project\clang\lib\Sema\SemaExprObjC.cpp, line 343
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and 
include the crash backtrace and dumped files.
Stack dump:
0.      Program arguments: llvm\\out\\build\\x64-Debug\\bin\\clang.exe -cc1 -x 
objective-c -fsyntax-only -fobjc-constant-literals -fconstant-nsnumber-literals 
-fconstant-nsarray-literals -fconstant-nsdictionary-literals 
"C:\\Users\\aballman\\OneDrive - Intel Corporation\\Desktop\\test.c"
1.      C:\Users\aballman\OneDrive - Intel Corporation\Desktop\test.c:24:48: 
current parser token ','
Exception Code: 0x80000003
 #0 0x00007ff665154e9c HandleAbort 
F:\source\llvm-project\llvm\lib\Support\Windows\Signals.inc:372:0
 #1 0x00007ffeefc59e77 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x99e77)
 #2 0x00007ffeefc5bab9 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x9bab9)
 #3 0x00007ffeefc61715 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0xa1715)
 #4 0x00007ffeefc61387 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0xa1387)
 #5 0x00007ffeefc5f351 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x9f351)
 #6 0x00007ffeefc61c7f (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0xa1c7f)
 #7 0x00007ff66dffeaf1 CheckObjCNumberExpressionIsConstant 
F:\source\llvm-project\clang\lib\Sema\SemaExprObjC.cpp:341:0
 #8 0x00007ff66dfe637c clang::SemaObjC::BuildObjCNumericLiteral(class 
clang::SourceLocation, class clang::Expr *) 
F:\source\llvm-project\clang\lib\Sema\SemaExprObjC.cpp:426:0
 #9 0x00007ff66eeea9e7 clang::Parser::ParseObjCNumericLiteral(class 
clang::SourceLocation) 
F:\source\llvm-project\clang\lib\Parse\ParseObjc.cpp:3035:0
#10 0x00007ff66eee9dec clang::Parser::ParseObjCAtExpression(class 
clang::SourceLocation) 
F:\source\llvm-project\clang\lib\Parse\ParseObjc.cpp:2563:0
#11 0x00007ff66eeac135 clang::Parser::ParseCastExpression(enum 
clang::CastParseKind, bool, bool &, enum clang::TypoCorrectionTypeBehavior, 
bool, bool *) F:\source\llvm-project\clang\lib\Parse\ParseExpr.cpp:1553:0
#12 0x00007ff66eeace0b clang::Parser::ParseCastExpression(enum 
clang::CastParseKind, bool, enum clang::TypoCorrectionTypeBehavior, bool, bool 
*) F:\source\llvm-project\clang\lib\Parse\ParseExpr.cpp:594:0
#13 0x00007ff66eea207c clang::Parser::ParseAssignmentExpression(enum 
clang::TypoCorrectionTypeBehavior) 
F:\source\llvm-project\clang\lib\Parse\ParseExpr.cpp:92:0
#14 0x00007ff66eeeb172 clang::Parser::ParseObjCDictionaryLiteral(class 
clang::SourceLocation) 
F:\source\llvm-project\clang\lib\Parse\ParseObjc.cpp:3122:0
#15 0x00007ff66eee9efe clang::Parser::ParseObjCAtExpression(class 
clang::SourceLocation) 
F:\source\llvm-project\clang\lib\Parse\ParseObjc.cpp:2578:0
#16 0x00007ff66eeac135 clang::Parser::ParseCastExpression(enum 
clang::CastParseKind, bool, bool &, enum clang::TypoCorrectionTypeBehavior, 
bool, bool *) F:\source\llvm-project\clang\lib\Parse\ParseExpr.cpp:1553:0
#17 0x00007ff66eeace0b clang::Parser::ParseCastExpression(enum 
clang::CastParseKind, bool, enum clang::TypoCorrectionTypeBehavior, bool, bool 
*) F:\source\llvm-project\clang\lib\Parse\ParseExpr.cpp:594:0
#18 0x00007ff66eea207c clang::Parser::ParseAssignmentExpression(enum 
clang::TypoCorrectionTypeBehavior) 
F:\source\llvm-project\clang\lib\Parse\ParseExpr.cpp:92:0
#19 0x00007ff66fad6203 clang::Parser::ParseInitializer(class clang::Decl *) 
F:\source\llvm-project\clang\lib\Parse\ParseInit.cpp:619:0
#20 0x00007ff66ee3d71b 
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(class 
clang::Declarator &, struct clang::Parser::ParsedTemplateInfo const &, struct 
clang::Parser::ForRangeInit *) 
F:\source\llvm-project\clang\lib\Parse\ParseDecl.cpp:2644:0
#21 0x00007ff66ee3c0e1 clang::Parser::ParseDeclGroup(class 
clang::ParsingDeclSpec &, enum clang::DeclaratorContext, class 
clang::ParsedAttributes &, struct clang::Parser::ParsedTemplateInfo &, class 
clang::SourceLocation *, struct clang::Parser::ForRangeInit *) 
F:\source\llvm-project\clang\lib\Parse\ParseDecl.cpp:2383:0
#22 0x00007ff66e189b24 clang::Parser::ParseDeclOrFunctionDefInternal(class 
clang::ParsedAttributes &, class clang::ParsedAttributes &, class 
clang::ParsingDeclSpec &, enum clang::AccessSpecifier) 
F:\source\llvm-project\clang\lib\Parse\Parser.cpp:1153:0
#23 0x00007ff66e188fbd 
clang::Parser::ParseDeclarationOrFunctionDefinition(class 
clang::ParsedAttributes &, class clang::ParsedAttributes &, class 
clang::ParsingDeclSpec *, enum clang::AccessSpecifier) 
F:\source\llvm-project\clang\lib\Parse\Parser.cpp:1175:0
#24 0x00007ff66e1887dd clang::Parser::ParseExternalDeclaration(class 
clang::ParsedAttributes &, class clang::ParsedAttributes &, class 
clang::ParsingDeclSpec *) 
F:\source\llvm-project\clang\lib\Parse\Parser.cpp:1003:0
#25 0x00007ff66e181147 clang::Parser::ParseTopLevelDecl(class 
clang::OpaquePtr<class clang::DeclGroupRef> &, enum 
clang::Sema::ModuleImportState &) 
F:\source\llvm-project\clang\lib\Parse\Parser.cpp:711:0
#26 0x00007ff66b2e22d4 clang::ParseAST(class clang::Sema &, bool, bool) 
F:\source\llvm-project\clang\lib\Parse\ParseAST.cpp:170:0
#27 0x00007ff66767da14 clang::ASTFrontendAction::ExecuteAction(void) 
F:\source\llvm-project\clang\lib\Frontend\FrontendAction.cpp:1464:0
#28 0x00007ff66767d284 clang::FrontendAction::Execute(void) 
F:\source\llvm-project\clang\lib\Frontend\FrontendAction.cpp:1344:0
#29 0x00007ff6654a7c86 clang::CompilerInstance::ExecuteAction(class 
clang::FrontendAction &) 
F:\source\llvm-project\clang\lib\Frontend\CompilerInstance.cpp:1033:0
#30 0x00007ff6655fe8a1 clang::ExecuteCompilerInvocation(class 
clang::CompilerInstance *) 
F:\source\llvm-project\clang\lib\FrontendTool\ExecuteCompilerInvocation.cpp:319:0
#31 0x00007ff6648000b8 cc1_main(class llvm::ArrayRef<char const *>, char const 
*, void *) F:\source\llvm-project\clang\tools\driver\cc1_main.cpp:296:0
#32 0x00007ff6647ee630 ExecuteCC1Tool 
F:\source\llvm-project\clang\tools\driver\driver.cpp:229:0
#33 0x00007ff6647eeed3 clang_main(int, char **, struct llvm::ToolContext const 
&) F:\source\llvm-project\clang\tools\driver\driver.cpp:277:0
#34 0x00007ff66482a44b main 
F:\source\llvm-project\llvm\out\build\x64-Debug\tools\clang\tools\driver\clang-driver.cpp:17:0
#35 0x00007ff66fc61fd9 invoke_main 
D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79:0
#36 0x00007ff66fc62112 __scrt_common_main_seh 
D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288:0
#37 0x00007ff66fc6219e __scrt_common_main 
D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331:0
#38 0x00007ff66fc621be mainCRTStartup 
D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17:0
#39 0x00007fff6962e957 (C:\WINDOWS\System32\KERNEL32.DLL+0x2e957)
#40 0x00007fff6aea7c1c (C:\WINDOWS\SYSTEM32\ntdll.dll+0x87c1c)
```
(This should be a compile error not an assertion.) Nothing to be done in your 
PR though, mostly just an observation that this area may have fragility.

I asked a few question, but I think this requires @ahatanak for sign-off.

https://github.com/llvm/llvm-project/pull/209688
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to