[all-commits] [llvm/llvm-project] b9ec68: Correctly diagnose incomplete arrays with static s...

Aaron Ballman via All-commits all-commits at lists.llvm.org
Mon Apr 7 04:12:54 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b9ec68431b45a9859517aacac684e7290f1679f2
      https://github.com/llvm/llvm-project/commit/b9ec68431b45a9859517aacac684e7290f1679f2
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2025-04-07 (Mon, 07 Apr 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/C/drs/dr0xx.c
    M clang/test/Sema/incomplete-decl.c
    M clang/test/Sema/tentative-decls.c

  Log Message:
  -----------
  Correctly diagnose incomplete arrays with static storage in C (#134374)

A file scope declaration without an initializer which is neither extern
nor thread_local is a tentative definition. If the declaration of an
identifier for an object is a tentative definition and has internal
linkage, the declared type shall not be an incomplete type.

Clang was previously failing to diagnose this in -pedantic mode.

Fixes #50661

---------

Co-authored-by: Mariya Podchishchaeva <mariya.podchishchaeva at intel.com>



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