https://github.com/NagyDonat created 
https://github.com/llvm/llvm-project/pull/128013

Because they are the last two remaining test files that appeared under 
`clang/test/Analysis` but were unrelated to the clang static analyzer. For 
background see the following discourse thread: 
https://discourse.llvm.org/t/taking-ownership-of-clang-test-analysis/84689/2

I placed them in in `clang/test/SemaCXX` because they are testing the 
`-Wuninitialized` warning family and the other tests of this feature can be 
found there (or in `Sema`, `SemaObjC` depending on the language).

Note that `clang/test/Analysis` contains many other test files named 
`uninit-*`, but those test the uninitialized value handling of the clang static 
analyzer, which is independent of the (non-path-sensitive) compiler warnings 
that are tested in the two files that I'm moving.

Also note that the implementation of the `-Wuninitialized`-like warnings relies 
on the source files `clang/lib/Analysis/UninitializedValues.cpp` and 
`clang/lib/Sema/AnalysisBasedWarnings.cpp`, and this would theoretically 
justify leaving their tests in the "Analysis" directory; but in practice the 
"Analysis" directory is almost exclusively used by the static analyzer, so I 
still decided to relocate these two tests for the sake of consistency.

From fa0bb867421893e6f4c840b88e677a44460b1fd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Don=C3=A1t=20Nagy?= <donat.n...@ericsson.com>
Date: Thu, 20 Feb 2025 15:32:33 +0100
Subject: [PATCH] [Sema][NFC] Move two misplaced uninit tests to
 clang/test/SemaCXX

Because they are the last two remaining test files that appeared under
`clang/test/Analysis` but were unrelated to the clang static analyzer.
For background see the following discourse thread:
https://discourse.llvm.org/t/taking-ownership-of-clang-test-analysis/84689/2

I placed them in in `clang/test/SemaCXX` because they are testing the
`-Wuninitialized` warning family and the other tests of this feature can
be found there (or in `Sema`, `SemaObjC` depending on the language).

Note that `clang/test/Analysis` contains many other test files named
`uninit-*`, but those test the uninitialized value handling of the clang
static analyzer, which is independent of the (non-path-sensitive)
compiler warnings that are tested in the two files that I'm moving.

Also note that the implementation of the `-Wuninitialized`-like warnings
relies on the source files `clang/lib/Analysis/UninitializedValues.cpp`
and `clang/lib/Sema/AnalysisBasedWarnings.cpp`, and this would
theoretically justify leaving their tests in the "Analysis" directory;
but in practice the "Analysis" directory is almost exclusively used by
the static analyzer, so I still decided to relocate these two tests for
the sake of consistency.
---
 clang/test/{Analysis => SemaCXX}/uninit-asm-goto.cpp  | 0
 clang/test/{Analysis => SemaCXX}/uninit-sometimes.cpp | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 rename clang/test/{Analysis => SemaCXX}/uninit-asm-goto.cpp (100%)
 rename clang/test/{Analysis => SemaCXX}/uninit-sometimes.cpp (100%)

diff --git a/clang/test/Analysis/uninit-asm-goto.cpp 
b/clang/test/SemaCXX/uninit-asm-goto.cpp
similarity index 100%
rename from clang/test/Analysis/uninit-asm-goto.cpp
rename to clang/test/SemaCXX/uninit-asm-goto.cpp
diff --git a/clang/test/Analysis/uninit-sometimes.cpp 
b/clang/test/SemaCXX/uninit-sometimes.cpp
similarity index 100%
rename from clang/test/Analysis/uninit-sometimes.cpp
rename to clang/test/SemaCXX/uninit-sometimes.cpp

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to