[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] fix getTemplateInstantiationArgs (PR #199528)

Martin Storsjö via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 2 03:56:35 PDT 2026


mstorsjo wrote:

This change breaks compiling clang-tools-extra with the newly-built Clang - see e.g. https://github.com/mstorsjo/llvm-mingw/actions/runs/26795477370/job/79006149122.

When compiling `tools/clang/tools/extra/clang-doc/CMakeFiles/obj.clangDoc.dir/JSONGenerator.cpp.o` with the newly built Clang with this change, it errors out like this:
```
$ ninja tools/clang/tools/extra/clang-doc/CMakeFiles/obj.clangDoc.dir/JSONGenerator.cpp.o
[1/1] Building CXX object tools/clang/tools/extra/clang-doc/CMakeFiles/obj.clangDoc.dir/JSONGenerator.cpp.o
FAILED: tools/clang/tools/extra/clang-doc/CMakeFiles/obj.clangDoc.dir/JSONGenerator.cpp.o 
/Users/martin/clang-trunk/bin/clang++ -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/Users/martin/code/llvm-project/llvm/build-stagetwo/tools/clang/tools/extra/clang-doc -I/Users/martin/code/llvm-project/clang-tools-extra/clang-doc -I/Users/martin/code/llvm-project/clang/include -I/Users/martin/code/llvm-project/llvm/build-stagetwo/tools/clang/include -I/Users/martin/code/llvm-project/llvm/build-stagetwo/include -I/Users/martin/code/llvm-project/llvm/include -isystem /opt/homebrew/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -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 -fdiagnostics-color -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.2.sdk -mmacosx-version-min=15.7 -fno-exceptions -funwind-tables -fno-rtti -MD -MT tools/clang/tools/extra/clang-doc/CMakeFiles/obj.clangDoc.dir/JSONGenerator.cpp.o -MF tools/clang/tools/extra/clang-doc/CMakeFiles/obj.clangDoc.dir/JSONGenerator.cpp.o.d -o tools/clang/tools/extra/clang-doc/CMakeFiles/obj.clangDoc.dir/JSONGenerator.cpp.o -c /Users/martin/code/llvm-project/clang-tools-extra/clang-doc/JSONGenerator.cpp
In file included from /Users/martin/code/llvm-project/clang-tools-extra/clang-doc/JSONGenerator.cpp:17:
In file included from /Users/martin/code/llvm-project/clang-tools-extra/clang-doc/Generators.h:15:
In file included from /Users/martin/code/llvm-project/clang-tools-extra/clang-doc/Representation.h:17:
In file included from /Users/martin/code/llvm-project/clang/include/clang/AST/Type.h:20:
In file included from /Users/martin/code/llvm-project/clang/include/clang/AST/Decl.h:16:
In file included from /Users/martin/code/llvm-project/clang/include/clang/AST/APNumericStorage.h:12:
In file included from /Users/martin/code/llvm-project/llvm/include/llvm/ADT/APFloat.h:19:
In file included from /Users/martin/code/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:13:
In file included from /Users/martin/code/llvm-project/llvm/include/llvm/ADT/STLExtras.h:22:
/Users/martin/code/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:55:3: error: definition with same mangled name '_ZN4llvm12function_refIFvRNS_4json6ObjectEEEC1IZN5clang3docL14serializeArrayINS_12simple_ilistINS8_8InfoNodeINS8_9ReferenceEEEJEEENSt3__18functionIFvRKSC_S3_EEEEEvRKT_S3_NS_9StringRefET0_SO_S5_E3$_0EEOSL_PNSF_9enable_ifIXntsr3std7is_sameINS_12remove_cvrefISL_E4typeES5_EE5valueEvE4typeEPNSS_IXooL_ZNSF_17integral_constantIbLb1EE5valueEEsr3std14is_convertibleIDTclclsr3stdE7declvalISL_EEclL_ZNSF_7declvalB8nn200100IS3_EEDTclsr3stdE9__declvalISL_ELi0EEEvEEEEvEE5valueEvE4typeE' as another definition
   55 |   function_ref(
      |   ^
/Users/martin/code/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:55:3: note: previous definition is here
1 error generated.
ninja: build stopped: subcommand failed.
```

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


More information about the lldb-commits mailing list