[clang] [Clang] Implement diagnostics for why `std::is_standard_layout` is false (PR #144161)
Samarth Narang via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 25 11:00:50 PDT 2025
snarang181 wrote:
> Precommit CI found relevant failures:
>
> ```
> FAILED: tools/clang/include/clang/Basic/DiagnosticAnalysisEnums.inc /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/include/clang/Basic/DiagnosticAnalysisEnums.inc
> cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/include/clang/Basic && /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang-tblgen -gen-clang-diags-enums -clang-component=Analysis -I/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/Basic -I/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/Basic/Diagnostic.td --write-if-changed -o DiagnosticAnalysisEnums.inc -d DiagnosticAnalysisEnums.inc.d && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/Basic /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/include/clang/Basic /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/include/clang/Basic/DiagnosticAnalysisEnums.inc.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/cf0b499e292100c840f13d8fd4f9c37039043cd2a7ced2cb25ac66d1e34104e6.d
> Included from /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/Basic/Diagnostic.td:236:
> /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td:1775:5: error: Duplicate enumerator name 'VirtualFunction'
> def note_unsatisfied_trait_reason
> ^
> /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang-tblgen: 1 errors.
> ```
I think the `VirtualFunction` error diagnostic is better now as it emits either the virtual function or the higher-level class if a virtual method does not exist.
https://github.com/llvm/llvm-project/pull/144161
More information about the cfe-commits
mailing list