[all-commits] [llvm/llvm-project] 369c5f: [NFC][Clang] Use previously declared variable inst...

PoYao Chang via All-commits all-commits at lists.llvm.org
Mon Apr 11 20:18:11 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 369c5fa17be0105cbe801a78aa8419d06aad184a
      https://github.com/llvm/llvm-project/commit/369c5fa17be0105cbe801a78aa8419d06aad184a
  Author: PoYao Chang <poyaoc97 at gmail.com>
  Date:   2022-04-12 (Tue, 12 Apr 2022)

  Changed paths:
    M clang/lib/Sema/SemaDeclCXX.cpp

  Log Message:
  -----------
  [NFC][Clang] Use previously declared variable instead of calling function redundantly


  Commit: 50b1faf5c188956fb59ea7d9f9d470591771aedb
      https://github.com/llvm/llvm-project/commit/50b1faf5c188956fb59ea7d9f9d470591771aedb
  Author: PoYao Chang <poyaoc97 at gmail.com>
  Date:   2022-04-12 (Tue, 12 Apr 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Parse/Parser.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaDeclCXX.cpp
    A clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.general/p2.cpp
    M clang/www/cxx_dr_status.html

  Log Message:
  -----------
  [Clang] CWG 1394: Incomplete types as parameters of deleted functions

According to CWG 1394 and C++20 [dcl.fct.def.general]p2,
Clang should not diagnose incomplete types if function body is "= delete;".
For example:
```
struct Incomplete;
Incomplete f(Incomplete) = delete; // well-formed
```

Also close https://github.com/llvm/llvm-project/issues/52802

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


Compare: https://github.com/llvm/llvm-project/compare/ee4c235386a3...50b1faf5c188


More information about the All-commits mailing list