[all-commits] [llvm/llvm-project] a43d1a: [clang] Make 'align-mismatch' warning work without...

Alex Lorenz via All-commits all-commits at lists.llvm.org
Fri Oct 29 13:39:37 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a43d1aa8525649a64b1f0ed5a5c25718c28920c1
      https://github.com/llvm/llvm-project/commit/a43d1aa8525649a64b1f0ed5a5c25718c28920c1
  Author: Alex Lorenz <arphaman at gmail.com>
  Date:   2021-10-29 (Fri, 29 Oct 2021)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/CodeGen/typedef_alignment_mismatch_warning.cpp

  Log Message:
  -----------
  [clang] Make 'align-mismatch' warning work without an associated function declaration

This change fixes a crash where a NULL fd was used to emit a diagnostic.
Instead of crashing, just avoid printing the declaration name when there's no
associated function declaration.

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




More information about the All-commits mailing list