[clang] [APINotes][unsafe-buffer-usage] Add [[clang::unsafe_buffer_usage]] support in APINotes (PR #189775)

via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 8 14:56:16 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

The build failed before running any tests. Click on a failure below to see the details.

<details>
<summary>[code=1] tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaAPINotes.cpp.obj</summary>

```
FAILED: [code=1] tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaAPINotes.cpp.obj
sccache C:\clang\clang-msvc\bin\clang-cl.exe  /nologo -TP -DCLANG_BUILD_STATIC -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:\_work\llvm-project\llvm-project\build\tools\clang\lib\Sema -IC:\_work\llvm-project\llvm-project\clang\lib\Sema -IC:\_work\llvm-project\llvm-project\clang\include -IC:\_work\llvm-project\llvm-project\build\tools\clang\include -IC:\_work\llvm-project\llvm-project\build\include -IC:\_work\llvm-project\llvm-project\llvm\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:__cplusplus /Oi /Brepro /bigobj /permissive- -Werror=unguarded-availability-new /W4  -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported /Gw /O2 /Ob2  -std:c++17 -MD -UNDEBUG /EHs-c- /GR- /showIncludes /Fotools\clang\lib\Sema\CMakeFiles\obj.clangSema.dir\SemaAPINotes.cpp.obj /Fdtools\clang\lib\Sema\CMakeFiles\obj.clangSema.dir\ -c -- C:\_work\llvm-project\llvm-project\clang\lib\Sema\SemaAPINotes.cpp
In file included from C:\_work\llvm-project\llvm-project\clang\lib\Sema\SemaAPINotes.cpp:16:
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(12,45): error: unknown type name 'raw_ostream'; did you mean 'clang::raw_ostream'?
12 | static inline void DelimitAttributeArgument(raw_ostream& OS, bool& IsFirst) {
|                                             ^~~~~~~~~~~
|                                             clang::raw_ostream
C:\_work\llvm-project\llvm-project\clang\include\clang/Basic/LLVM.h(83,15): note: 'clang::raw_ostream' declared here
83 |   using llvm::raw_ostream;
|               ^
In file included from C:\_work\llvm-project\llvm-project\clang\lib\Sema\SemaAPINotes.cpp:16:
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(19,17): error: variable has incomplete type 'class CLANG_ABI'
19 | class CLANG_ABI AArch64SVEPcsAttr : public InheritableAttr {
|                 ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(19,7): note: forward declaration of 'CLANG_ABI'
19 | class CLANG_ABI AArch64SVEPcsAttr : public InheritableAttr {
|       ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(19,35): error: expected ';' after top level declarator
19 | class CLANG_ABI AArch64SVEPcsAttr : public InheritableAttr {
|                                   ^
|                                   ;
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(19,37): error: expected unqualified-id
19 | class CLANG_ABI AArch64SVEPcsAttr : public InheritableAttr {
|                                     ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(49,17): error: variable has incomplete type 'class CLANG_ABI'
49 | class CLANG_ABI AArch64VectorPcsAttr : public InheritableAttr {
|                 ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(19,7): note: forward declaration of 'CLANG_ABI'
19 | class CLANG_ABI AArch64SVEPcsAttr : public InheritableAttr {
|       ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(49,38): error: expected ';' after top level declarator
49 | class CLANG_ABI AArch64VectorPcsAttr : public InheritableAttr {
|                                      ^
|                                      ;
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(49,40): error: expected unqualified-id
49 | class CLANG_ABI AArch64VectorPcsAttr : public InheritableAttr {
|                                        ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(79,17): error: variable has incomplete type 'class CLANG_ABI'
79 | class CLANG_ABI AMDGPUFlatWorkGroupSizeAttr : public InheritableAttr {
|                 ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(19,7): note: forward declaration of 'CLANG_ABI'
19 | class CLANG_ABI AArch64SVEPcsAttr : public InheritableAttr {
|       ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(79,45): error: expected ';' after top level declarator
79 | class CLANG_ABI AMDGPUFlatWorkGroupSizeAttr : public InheritableAttr {
|                                             ^
|                                             ;
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(79,47): error: expected unqualified-id
79 | class CLANG_ABI AMDGPUFlatWorkGroupSizeAttr : public InheritableAttr {
|                                               ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(122,17): error: variable has incomplete type 'class CLANG_ABI'
122 | class CLANG_ABI AMDGPUMaxNumWorkGroupsAttr : public InheritableAttr {
|                 ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(19,7): note: forward declaration of 'CLANG_ABI'
19 | class CLANG_ABI AArch64SVEPcsAttr : public InheritableAttr {
|       ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(122,44): error: expected ';' after top level declarator
122 | class CLANG_ABI AMDGPUMaxNumWorkGroupsAttr : public InheritableAttr {
|                                            ^
|                                            ;
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(122,46): error: expected unqualified-id
122 | class CLANG_ABI AMDGPUMaxNumWorkGroupsAttr : public InheritableAttr {
|                                              ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(175,17): error: variable has incomplete type 'class CLANG_ABI'
175 | class CLANG_ABI AMDGPUNumSGPRAttr : public InheritableAttr {
|                 ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(19,7): note: forward declaration of 'CLANG_ABI'
19 | class CLANG_ABI AArch64SVEPcsAttr : public InheritableAttr {
|       ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(175,35): error: expected ';' after top level declarator
175 | class CLANG_ABI AMDGPUNumSGPRAttr : public InheritableAttr {
|                                   ^
|                                   ;
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(175,37): error: expected unqualified-id
175 | class CLANG_ABI AMDGPUNumSGPRAttr : public InheritableAttr {
|                                     ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(211,17): error: variable has incomplete type 'class CLANG_ABI'
211 | class CLANG_ABI AMDGPUNumVGPRAttr : public InheritableAttr {
|                 ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(19,7): note: forward declaration of 'CLANG_ABI'
19 | class CLANG_ABI AArch64SVEPcsAttr : public InheritableAttr {
|       ^
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(211,35): error: expected ';' after top level declarator
211 | class CLANG_ABI AMDGPUNumVGPRAttr : public InheritableAttr {
|                                   ^
|                                   ;
C:\_work\llvm-project\llvm-project\build\tools\clang\include\clang/AST/Attrs.inc(211,37): error: expected unqualified-id
211 | class CLANG_ABI AMDGPUNumVGPRAttr : public InheritableAttr {
|                                     ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
```
</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/189775


More information about the cfe-commits mailing list