[clang] [clang-tools-extra] [Clang] Reland support friend declarations with a dependent nested-name-specifier (PR #208345)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 16 00:52:17 PDT 2026


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang-tools-extra,clang` at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/31681

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --cmake-file=AMDGPULibcBot.cmake' (failure)
...
[3823/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaTypeTraits.cpp.o
[3824/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCUDARuntime.cpp.o
[3825/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaDecl.cpp.o
[3826/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaStmt.cpp.o
[3827/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCXX.cpp.o
[3828/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCXXABI.cpp.o
[3829/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCUDANV.cpp.o
[3830/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaOverload.cpp.o
[3831/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCleanup.cpp.o
[3832/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaTemplateInstantiateDecl.cpp.o
FAILED: tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaTemplateInstantiateDecl.cpp.o 
ccache /usr/bin/c++ -DCLANG_EXPORTS -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/tools/clang/lib/Sema -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/lib/Sema -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/include -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/tools/clang/include -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/include -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaTemplateInstantiateDecl.cpp.o -MF tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaTemplateInstantiateDecl.cpp.o.d -o tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaTemplateInstantiateDecl.cpp.o -c /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:2119:16: error: declaration of ‘clang::TemplateName SubstitutedFriend::TemplateName’ changes meaning of ‘TemplateName’ [-fpermissive]
 2119 |   TemplateName TemplateName;
      |                ^~~~~~~~~~~~
In file included from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/include/clang/AST/TypeBase.h:22,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/include/clang/AST/DeclarationName.h:16,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/include/clang/AST/DeclBase.h:19,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/include/clang/AST/Decl.h:20,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/lib/Sema/CoroutineStmtBuilder.h:16,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/lib/Sema/TreeTransform.h:16,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:12:
/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/include/clang/AST/TemplateName.h:222:7: note: ‘TemplateName’ declared here as ‘class clang::TemplateName’
  222 | class TemplateName {
      |       ^~~~~~~~~~~~
[3833/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCoroutine.cpp.o
[3834/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGDeclCXX.cpp.o
[3835/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGClass.cpp.o
[3836/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaConcept.cpp.o
[3837/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGLoopInfo.cpp.o
[3838/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGException.cpp.o
[3839/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaType.cpp.o
[3840/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGGPUBuiltin.cpp.o
[3841/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprAgg.cpp.o
[3842/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprComplex.cpp.o
[3843/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprCXX.cpp.o
[3844/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaSYCL.cpp.o
[3845/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprConstant.cpp.o
[3846/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGDecl.cpp.o
[3847/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGHLSLBuiltins.cpp.o
[3848/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCall.cpp.o
/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/lib/CodeGen/CGCall.cpp: In member function ‘unsigned int clang::CodeGen::CodeGenTypes::ClangCallConvToLLVMCallConv(clang::CallingConv)’:
/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/lib/CodeGen/CGCall.cpp:133:1: warning: control reaches end of non-void function [-Wreturn-type]
  133 | }
      | ^
[3849/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGObjCRuntime.cpp.o
[3850/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaTemplateDeductionGuide.cpp.o
[3851/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGNonTrivialStruct.cpp.o
[3852/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprScalar.cpp.o
Step 7 (build cmake config) failure: build cmake config (failure)
...
[3823/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaTypeTraits.cpp.o
[3824/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCUDARuntime.cpp.o
[3825/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaDecl.cpp.o
[3826/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaStmt.cpp.o
[3827/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCXX.cpp.o
[3828/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCXXABI.cpp.o
[3829/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCUDANV.cpp.o
[3830/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaOverload.cpp.o
[3831/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCleanup.cpp.o
[3832/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaTemplateInstantiateDecl.cpp.o
FAILED: tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaTemplateInstantiateDecl.cpp.o 
ccache /usr/bin/c++ -DCLANG_EXPORTS -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/tools/clang/lib/Sema -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/lib/Sema -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/include -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/tools/clang/include -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/build/include -I/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -O3 -DNDEBUG -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaTemplateInstantiateDecl.cpp.o -MF tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaTemplateInstantiateDecl.cpp.o.d -o tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaTemplateInstantiateDecl.cpp.o -c /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:2119:16: error: declaration of ‘clang::TemplateName SubstitutedFriend::TemplateName’ changes meaning of ‘TemplateName’ [-fpermissive]
 2119 |   TemplateName TemplateName;
      |                ^~~~~~~~~~~~
In file included from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/include/clang/AST/TypeBase.h:22,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/include/clang/AST/DeclarationName.h:16,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/include/clang/AST/DeclBase.h:19,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/include/clang/AST/Decl.h:20,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/lib/Sema/CoroutineStmtBuilder.h:16,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/lib/Sema/TreeTransform.h:16,
                 from /home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:12:
/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/include/clang/AST/TemplateName.h:222:7: note: ‘TemplateName’ declared here as ‘class clang::TemplateName’
  222 | class TemplateName {
      |       ^~~~~~~~~~~~
[3833/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCoroutine.cpp.o
[3834/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGDeclCXX.cpp.o
[3835/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGClass.cpp.o
[3836/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaConcept.cpp.o
[3837/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGLoopInfo.cpp.o
[3838/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGException.cpp.o
[3839/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaType.cpp.o
[3840/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGGPUBuiltin.cpp.o
[3841/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprAgg.cpp.o
[3842/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprComplex.cpp.o
[3843/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprCXX.cpp.o
[3844/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaSYCL.cpp.o
[3845/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprConstant.cpp.o
[3846/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGDecl.cpp.o
[3847/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGHLSLBuiltins.cpp.o
[3848/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGCall.cpp.o
/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/lib/CodeGen/CGCall.cpp: In member function ‘unsigned int clang::CodeGen::CodeGenTypes::ClangCallConvToLLVMCallConv(clang::CallingConv)’:
/home/botworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm-project/clang/lib/CodeGen/CGCall.cpp:133:1: warning: control reaches end of non-void function [-Wreturn-type]
  133 | }
      | ^
[3849/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGObjCRuntime.cpp.o
[3850/5114] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaTemplateDeductionGuide.cpp.o
[3851/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGNonTrivialStruct.cpp.o
[3852/5114] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CGExprScalar.cpp.o

```

</details>

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


More information about the cfe-commits mailing list