[all-commits] [llvm/llvm-project] 482c41: [Clang] [Sema] Diagnose unknown std::initializer_l...

Mital Ashok via All-commits all-commits at lists.llvm.org
Thu Jun 20 10:44:33 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 482c41e992c1edf8833a4577b56ff9dda49fbc83
      https://github.com/llvm/llvm-project/commit/482c41e992c1edf8833a4577b56ff9dda49fbc83
  Author: Mital Ashok <mital at mitalashok.co.uk>
  Date:   2024-06-20 (Thu, 20 Jun 2024)

  Changed paths:
    M clang-tools-extra/clangd/unittests/ASTTests.cpp
    M clang-tools-extra/clangd/unittests/HoverTests.cpp
    M clang-tools-extra/clangd/unittests/InlayHintTests.cpp
    M clang-tools-extra/clangd/unittests/XRefsTests.cpp
    M clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp
    M clang-tools-extra/test/clang-tidy/checkers/modernize/min-max-use-initializer-list.cpp
    M clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace-ignore-implicit-constructors.cpp
    M clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace.cpp
    M clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-vector-operation.cpp
    M clang-tools-extra/test/clang-tidy/checkers/readability/isolate-declaration-cxx17.cpp
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/CodeGen/CGExprAgg.cpp
    M clang/lib/Sema/SemaInit.cpp
    M clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp
    M clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7-cxx14.cpp
    M clang/test/CodeCompletion/ctor-signature.cpp
    M clang/test/Coverage/unresolved-ctor-expr.cpp
    M clang/test/Modules/Inputs/initializer_list/direct.h
    M clang/test/Modules/pr60775.cppm
    M clang/test/OpenMP/declare_reduction_codegen_in_templates.cpp
    M clang/test/Preprocessor/macro_with_initializer_list.cpp
    M clang/test/SemaCXX/PR20334-std_initializer_list_diagnosis_assertion.cpp
    M clang/test/SemaCXX/auto-invalid-init-crash.cpp
    M clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
    M clang/test/SemaCXX/cxx11-call-to-deleted-constructor.cpp
    M clang/test/SemaCXX/cxx98-compat.cpp
    M clang/test/SemaCXX/invalid-member-expr.cpp
    M clang/test/SemaTemplate/instantiate-init.cpp
    M clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
    M clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
    M clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp

  Log Message:
  -----------
  [Clang] [Sema] Diagnose unknown std::initializer_list layout in SemaInit (#95580)

This checks if the layout of `std::initializer_list` is something Clang
can handle much earlier and deduplicates the checks in
CodeGen/CGExprAgg.cpp and AST/ExprConstant.cpp

Also now diagnose `union initializer_list` (Fixes #95495), bit-field for
the size (Fixes a crash that would happen during codegen if it were
unnamed), base classes (that wouldn't be initialized) and polymorphic
classes (whose vtable pointer wouldn't be initialized).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list