[clang] [APINotes] Diagnose invalid Where.Parameters selectors (PR #209408)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 14 02:41:36 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 90404 tests passed
* 1681 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### Clang
<details>
<summary>Clang.APINotes/objc-forward-declarations.m</summary>

```
Exit Code: -6

Command Output (stdout):
--
# RUN: at line 1
rm -rf /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/APINotes/Output/objc-forward-declarations.m.tmp && mkdir -p /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/APINotes/Output/objc-forward-declarations.m.tmp
# executed command: rm -rf /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/APINotes/Output/objc-forward-declarations.m.tmp
# note: command had no output on stdout or stderr
# executed command: mkdir -p /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/APINotes/Output/objc-forward-declarations.m.tmp
# note: command had no output on stdout or stderr
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -fmodules -fimplicit-module-maps -fmodules-cache-path=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/APINotes/Output/objc-forward-declarations.m.tmp/ModulesCache -fapinotes-modules -fsyntax-only -F /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/APINotes/Inputs/Frameworks /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/APINotes/objc-forward-declarations.m -verify
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -fmodules -fimplicit-module-maps -fmodules-cache-path=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/APINotes/Output/objc-forward-declarations.m.tmp/ModulesCache -fapinotes-modules -fsyntax-only -F /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/APINotes/Inputs/Frameworks /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/APINotes/objc-forward-declarations.m -verify
# .---command stderr------------
# | clang: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/AST/DeclContextInternals.h:248: void clang::StoredDeclsList::addOrReplaceDecl(NamedDecl *): Assertion `!llvm::is_contained(getLookupResult(), D) && "Already exists!"' failed.
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and dumped files.
# | Stack dump:
# | 0.	/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/APINotes/Inputs/Frameworks/LayeredKit.framework/Headers/LayeredKit.h:11:1: current parser token '@'
# |  #0 0x000000000945caab llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:907:13
# |  #1 0x0000000009459971 llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:109:18
# |  #2 0x000000000945d8cb SignalHandler(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:474:38
# |  #3 0x000000000945d718 __find_if<const int *, __gnu_cxx::__ops::_Iter_equals_val<const int> > /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_algobase.h:2072:8
# |  #4 0x000000000945d718 __find_if<const int *, __gnu_cxx::__ops::_Iter_equals_val<const int> > /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_algobase.h:2117:14
# |  #5 0x000000000945d718 find<const int *, int> /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_algo.h:3897:14
# |  #6 0x000000000945d718 is_contained<const int (&)[10], int> /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLExtras.h:1953:12
# |  #7 0x000000000945d718 SignalHandlerTerminate(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:490:7
# |  #8 0x00007dd56090c330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
# |  #9 0x00007dd560965b2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
# | #10 0x00007dd56090c27e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
# | #11 0x00007dd5608ef8ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
# | #12 0x00007dd5608ef81b (/lib/x86_64-linux-gnu/libc.so.6+0x2881b)
# | #13 0x00007dd560902517 (/lib/x86_64-linux-gnu/libc.so.6+0x3b517)
# | #14 0x000000000c758912 operator* /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/AST/DeclBase.h:1367:7
# | #15 0x000000000c758912 operator()<clang::DeclListNode::iterator> /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/predefined_ops.h:270:11
# | #16 0x000000000c758912 __find_if<clang::DeclListNode::iterator, __gnu_cxx::__ops::_Iter_equals_val<clang::NamedDecl *const> > /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_algobase.h:2055:36
# | #17 0x000000000c758912 __find_if<clang::DeclListNode::iterator, __gnu_cxx::__ops::_Iter_equals_val<clang::NamedDecl *const> > /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_algobase.h:2117:14
# | #18 0x000000000c758912 find<clang::DeclListNode::iterator, clang::NamedDecl *> /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_algo.h:3897:14
# | #19 0x000000000c758912 is_contained<clang::DeclContextLookupResult, clang::NamedDecl *> /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLExtras.h:1953:12
# | #20 0x000000000c758912 clang::StoredDeclsList::addOrReplaceDecl(clang::NamedDecl*) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/AST/DeclContextInternals.h:248:13
# | #21 0x000000000c757611 clang::DeclContext::makeDeclVisibleInContextImpl(clang::NamedDecl*, bool) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/AST/DeclBase.cpp:2206:1
# | #22 0x000000000c756f66 getDeclKind /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/AST/DeclBase.h:2120:52
# | #23 0x000000000c756f66 isTransparentContext /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/AST/DeclBase.cpp:1425:7
# | #24 0x000000000c756f66 clang::DeclContext::makeDeclVisibleInContextWithFlags(clang::NamedDecl*, bool, bool) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/AST/DeclBase.cpp:2163:7
# | #25 0x000000000bb4a085 getLangOpts /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/Sema/Sema.h:934:51
# | #26 0x000000000bb4a085 clang::Sema::PushOnScopeChains(clang::NamedDecl*, clang::Scope*, bool) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Sema/SemaDecl.cpp:1589:7
# | #27 0x000000000bc709e6 clang::SemaObjC::ActOnStartProtocolInterface(clang::SourceLocation, clang::IdentifierInfo*, clang::SourceLocation, clang::Decl* const*, unsigned int, clang::SourceLocation const*, clang::SourceLocation, clang::ParsedAttributesView const&, clang::SkipBodyInfo*) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Sema/SemaDeclObjC.cpp:1269:12
# | #28 0x000000000b8d8050 clang::Parser::ParseObjCAtProtocolDeclaration(clang::SourceLocation, clang::ParsedAttributes&) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Parse/ParseObjc.cpp:1863:48
# | #29 0x000000000b8d66c5 clang::Parser::ParseObjCAtDirectives(clang::ParsedAttributes&, clang::ParsedAttributes&) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Parse/ParseObjc.cpp:78:5
# | #30 0x000000000b83c490 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Parse/Parser.cpp:0:12
# | #31 0x000000000b83ac40 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Parse/Parser.cpp:711:10
# | #32 0x000000000b82e34e clang::ParseAST(clang::Sema&, bool, bool) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Parse/ParseAST.cpp:169:5
# | #33 0x000000000a35be76 clang::FrontendAction::Execute() /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1348:10
# | #34 0x000000000a2cc7b9 getPtr /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Error.h:278:42
# | #35 0x000000000a2cc7b9 operator bool /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Error.h:241:16
# | #36 0x000000000a2cc7b9 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1033:23
# | #37 0x000000000a2db7cf operator() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:99:2
# | #38 0x000000000a2db7cf ~unique_ptr /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:404:4
# | #39 0x000000000a2db7cf operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1317:7
# | #40 0x000000000a2db7cf void llvm::function_ref<void ()>::callback_fn<clang::CompilerInstance::compileModule(clang::SourceLocation, llvm::StringRef, llvm::StringRef, clang::CompilerInstance&)::$_0>(long) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
# | #41 0x00000000093b9c7e operator() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:0:12
# | #42 0x00000000093b9c7e llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:440:3
# | #43 0x00000000093b9eb4 RunSafelyOnThread_Dispatch(void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:524:16
# | #44 0x00000000093b9ff2 operator() /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:99:2
# | #45 0x00000000093b9ff2 ~unique_ptr /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:404:4
# | #46 0x00000000093b9ff2 GenericThreadProxy<std::tuple<void (*)(void *), (anonymous namespace)::RunSafelyOnThreadInfo *> > /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/thread.h:49:3
# | #47 0x00000000093b9ff2 void* llvm::thread::ThreadProxy<std::tuple<void (*)(void*), (anonymous namespace)::RunSafelyOnThreadInfo*>>(void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/thread.h:64:5
# | #48 0x00007dd560963aa4 (/lib/x86_64-linux-gnu/libc.so.6+0x9caa4)
# | #49 0x00007dd5609f0c6c (/lib/x86_64-linux-gnu/libc.so.6+0x129c6c)
# `-----------------------------
# error: command failed with exit status: -6

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/209408


More information about the cfe-commits mailing list