[all-commits] [llvm/llvm-project] 6b737c: [clang][Sema] Fix crash on atomic builtins with in...

Takuya Shimizu via All-commits all-commits at lists.llvm.org
Sat Jun 29 22:09:31 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b737c444617fe8c11eb48f978c579cc160bfff0
      https://github.com/llvm/llvm-project/commit/6b737c444617fe8c11eb48f978c579cc160bfff0
  Author: Takuya Shimizu <shimizu2486 at gmail.com>
  Date:   2024-06-30 (Sun, 30 Jun 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/Sema/atomic-ops.c
    M clang/test/SemaCXX/atomic-ops.cpp

  Log Message:
  -----------
  [clang][Sema] Fix crash on atomic builtins with incomplete type args (#96374)

This patch fixes the crash when pointers to incomplete type are passed
to atomic builtins such as `__atomic_load`.
`ASTContext::getTypeInfoInChars` assumes that the argument type is a
complete type, so I added a check to eliminate cases where incomplete
types gets passed to this function

Relevant PR: https://github.com/llvm/llvm-project/pull/91057
Fixes https://github.com/llvm/llvm-project/issues/96289



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