[all-commits] [llvm/llvm-project] 795f67: [Sema] Don't treat a non-null template argument as...

Eli Friedman via All-commits all-commits at lists.llvm.org
Wed Oct 19 14:42:31 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 795f67934d38c2c080aa65f5244dcbdccdbd1154
      https://github.com/llvm/llvm-project/commit/795f67934d38c2c080aa65f5244dcbdccdbd1154
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2022-10-19 (Wed, 19 Oct 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp
    M clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1.cpp

  Log Message:
  -----------
  [Sema] Don't treat a non-null template argument as if it were null.

The way this code checks whether a pointer is null is wrong for other
reasons; it doesn't actually check whether a null pointer constant is a
"constant" in the C++ standard sense.  But this fix at least makes sure
we don't treat a non-null pointer as if it were null.

Fixes https://github.com/llvm/llvm-project/issues/57883

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




More information about the All-commits mailing list