[all-commits] [llvm/llvm-project] d81248: Call MarkVirtualMembersReferenced on an actual cla...

stbergmann via All-commits all-commits at lists.llvm.org
Thu Mar 2 06:50:28 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d812488d3c54c07f24d4bef79e329f17e7f19c3b
      https://github.com/llvm/llvm-project/commit/d812488d3c54c07f24d4bef79e329f17e7f19c3b
  Author: Stephan Bergmann <sbergman at redhat.com>
  Date:   2023-03-02 (Thu, 02 Mar 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaDeclCXX.cpp
    A clang/test/SemaCXX/warn-undefined-internal.cpp

  Log Message:
  -----------
  Call MarkVirtualMembersReferenced on an actual class definition

...rather than on potentially just a declaration.

Without the fix, the newly added clang/test/SemaCXX/warn-undefined-internal.cpp
failed with

> error: 'warning' diagnostics expected but not seen:
>   File /home/sbergman/github.com/llvm/llvm-project/clang/test/SemaCXX/warn-undefined-internal.cpp Line 12 (directive at /home/sbergman/github.com/llvm/llvm-project/clang/test/SemaCXX/warn-undefined-internal.cpp:13): function 'test2()::S::f' has internal linkage but is not defined
> error: 'note' diagnostics expected but not seen:
>   File /home/sbergman/github.com/llvm/llvm-project/clang/test/SemaCXX/warn-undefined-internal.cpp Line 14 (directive at /home/sbergman/github.com/llvm/llvm-project/clang/test/SemaCXX/warn-undefined-internal.cpp:15): used here

(I ran into this when two LibreOffice Clang plugins produced false positive
warnings, as they relied on Decl::isReferenced() returning true for such virtual
member functions of local classes.)

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




More information about the All-commits mailing list