[clang] [clang][Sema] Always clear UndefinedButUsed (PR #73955)

2023-12-12 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: In principle we could add this test as an xfail to make sure we have this scenario when unloading support is up to that stage. https://github.com/llvm/llvm-project/pull/73955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [clang][Sema] Always clear UndefinedButUsed (PR #73955)

2023-12-12 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo closed https://github.com/llvm/llvm-project/pull/73955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Always clear UndefinedButUsed (PR #73955)

2023-12-12 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: I tried to craft a test here, but declaration unloading in `clang-repl` is not powerful enough (yet) to show a (user-visible) consequence of the problem. On a high level, the problem should be triggered by: ``` clang-repl> template struct A { void f() { } }; clang-repl> A().f();

[clang] [clang][Sema] Always clear UndefinedButUsed (PR #73955)

2023-12-08 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. I'm okay landing these changes without test coverage, though tests are always preferred. LGTM https://github.com/llvm/llvm-project/pull/73955 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [clang][Sema] Always clear UndefinedButUsed (PR #73955)

2023-11-30 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: I think I understand. @AaronBallman from what concerns me that change seems fine it'd be hard to add a test for it right now. Do you have any concerns? https://github.com/llvm/llvm-project/pull/73955 ___ cfe-commits mailing list cfe-

[clang] [clang][Sema] Always clear UndefinedButUsed (PR #73955)

2023-11-30 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: I will try, but observing the consequences of this depends on unloading: Basically it happens if a declaration in `UndefinedButUsed` thas was previously defined is unloaded, which makes it undefined. For now, it's possible that for the upstream cases it's only an optimization bec

[clang] [clang][Sema] Always clear UndefinedButUsed (PR #73955)

2023-11-30 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Can you add a test? https://github.com/llvm/llvm-project/pull/73955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Always clear UndefinedButUsed (PR #73955)

2023-11-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jonas Hahnfeld (hahnjo) Changes Before, it was only cleared if there were undefined entities. This is important for Clang's incremental parsing as used by `clang-repl` that might receive multiple calls to `Sema.ActOnEndOfTranslationUnit`.

[clang] [clang][Sema] Always clear UndefinedButUsed (PR #73955)

2023-11-30 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo created https://github.com/llvm/llvm-project/pull/73955 Before, it was only cleared if there were undefined entities. This is important for Clang's incremental parsing as used by `clang-repl` that might receive multiple calls to `Sema.ActOnEndOfTranslationUnit`. >Fro