[all-commits] [llvm/llvm-project] 818de3: Warning for incorrect use of 'pure' attribute (#78...

kelbon via All-commits all-commits at lists.llvm.org
Sat Jan 20 09:37:48 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 818de32f31e8075657dd27938e4aeb1a46f3f631
      https://github.com/llvm/llvm-project/commit/818de32f31e8075657dd27938e4aeb1a46f3f631
  Author: kelbon <58717435+kelbon at users.noreply.github.com>
  Date:   2024-01-20 (Sat, 20 Jan 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/Analysis/call-invalidation.cpp
    M clang/test/CodeGen/function-attributes.c
    M clang/test/CodeGen/pragma-weak.c
    M clang/test/Import/attr/Inputs/S.cpp
    M clang/test/Import/attr/test.cpp
    M clang/test/Index/attributes.c
    M clang/test/Interpreter/disambiguate-decl-stmt.cpp
    M clang/test/Sema/attr-print.c
    A clang/test/Sema/incorrect_pure.cpp
    M clang/test/SemaCXX/attr-print.cpp
    M clang/test/SemaCXX/cxx0x-cursory-default-delete.cpp
    M clang/test/SemaCXX/cxx11-attr-print.cpp
    M clang/test/SemaCXX/warn-unused-value-cxx11.cpp

  Log Message:
  -----------
  Warning for incorrect use of 'pure' attribute (#78200)

This adds a warning when applying the `pure` attribute along with the `const` attribute, or when applying the `pure` attribute to a function with a `void` return type (including constructors and destructors).

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




More information about the All-commits mailing list