[all-commits] [llvm/llvm-project] 321036: [Inline-asm] Add diagnosts for unsupported inline ...

Phoebe Wang via All-commits all-commits at lists.llvm.org
Tue Mar 22 21:12:50 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 32103608fc073700f04238872d8b22655ddec3fb
      https://github.com/llvm/llvm-project/commit/32103608fc073700f04238872d8b22655ddec3fb
  Author: Phoebe Wang <phoebe.wang at intel.com>
  Date:   2022-03-23 (Wed, 23 Mar 2022)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/CodeGen/CGStmt.cpp
    M clang/lib/Sema/SemaStmtAsm.cpp
    M clang/test/Sema/asm.c

  Log Message:
  -----------
  [Inline-asm] Add diagnosts for unsupported inline assembly arguments

GCC supports power-of-2 size structures for the arguments. Clang supports fewer than GCC. But Clang always crashes for the unsupported cases.

This patch adds sema checks to do the diagnosts to solve these crashes.

Reviewed By: jyu2

Differential Revision: https://reviews.llvm.org/D107141




More information about the All-commits mailing list