[all-commits] [llvm/llvm-project] 514e43: inline stmt attribute diagnosing in templates

Erich Keane via All-commits all-commits at lists.llvm.org
Tue Mar 21 08:17:06 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 514e4359a543ea778c7fee6908a9c6eb10d0ccd9
      https://github.com/llvm/llvm-project/commit/514e4359a543ea778c7fee6908a9c6eb10d0ccd9
  Author: Erich Keane <erich.keane at intel.com>
  Date:   2023-03-21 (Tue, 21 Mar 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaStmtAttr.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/test/Sema/attr-alwaysinline.cpp
    M clang/test/Sema/attr-noinline.cpp

  Log Message:
  -----------
  inline stmt attribute diagnosing in templates

D146089's author discovered that our diagnostics for always/no inline
would null-dereference when used in a template. He fixed that by
skipping in the dependent case.

This patch makes sure we diagnose these after a template instantiation.
It also adds infrastructure for other statement attributes to add
checking/transformation.

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




More information about the All-commits mailing list