Skip to content

Fixed some warn-override tests in SemaCXX #122680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 15, 2025
Merged

Fixed some warn-override tests in SemaCXX #122680

merged 4 commits into from
Jan 15, 2025

Conversation

2LoS
Copy link
Contributor

@2LoS 2LoS commented Jan 13, 2025

The .cpp extension have been added to test files, so that they can be runned. Besides, the warn-suggest-override.cpp tests have been fixed.

@llvmbot llvmbot added the clang Clang issues not falling into any other category label Jan 13, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 13, 2025

@llvm/pr-subscribers-clang

Author: LoS (2LoS)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/122680.diff

3 Files Affected:

  • (renamed) clang/test/SemaCXX/warn-inconsistent-missing-destructor-override.cpp ()
  • (renamed) clang/test/SemaCXX/warn-suggest-destructor-override.cpp ()
  • (renamed) clang/test/SemaCXX/warn-suggest-override.cpp (+4-3)
diff --git a/clang/test/SemaCXX/warn-inconsistent-missing-destructor-override b/clang/test/SemaCXX/warn-inconsistent-missing-destructor-override.cpp
similarity index 100%
rename from clang/test/SemaCXX/warn-inconsistent-missing-destructor-override
rename to clang/test/SemaCXX/warn-inconsistent-missing-destructor-override.cpp
diff --git a/clang/test/SemaCXX/warn-suggest-destructor-override b/clang/test/SemaCXX/warn-suggest-destructor-override.cpp
similarity index 100%
rename from clang/test/SemaCXX/warn-suggest-destructor-override
rename to clang/test/SemaCXX/warn-suggest-destructor-override.cpp
diff --git a/clang/test/SemaCXX/warn-suggest-override b/clang/test/SemaCXX/warn-suggest-override.cpp
similarity index 58%
rename from clang/test/SemaCXX/warn-suggest-override
rename to clang/test/SemaCXX/warn-suggest-override.cpp
index e06c939ff001fc..436a17d489693c 100644
--- a/clang/test/SemaCXX/warn-suggest-override
+++ b/clang/test/SemaCXX/warn-suggest-override.cpp
@@ -17,13 +17,13 @@ struct C {
 
 struct D : public C {
   void run();
-  // expected-warning@-1 {{'run()' overrides a member function but is not marked 'override'}}
+  // expected-warning@-1 {{'run' overrides a member function but is not marked 'override'}}
   ~D();
 };
 
 struct E : public C {
   virtual void run();
-  // expected-warning@-1 {{'run()' overrides a member function but is not marked 'override'}}
+  // expected-warning@-1 {{'run' overrides a member function but is not marked 'override'}}
   virtual ~E();
 };
 
@@ -32,7 +32,8 @@ struct F : public C {
   ~F() override;
 };
 
-struct G : public C {
+struct G : public C { // expected-note {{mark 'G' as 'final'}}
   void run() final;
   ~G() final;
+  // expected-warning@-1 {{class with destructor marked as 'final' can not be inherited from}}
 };

@cor3ntin
Copy link
Contributor

Thanks for spotting that!
Can you add a description to your commit message?

@2LoS
Copy link
Contributor Author

2LoS commented Jan 15, 2025

@cor3ntin , can you merge the pull request, please?

@cor3ntin cor3ntin merged commit e33f456 into llvm:main Jan 15, 2025
8 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jan 15, 2025

LLVM Buildbot has detected a new failure on builder clang-cmake-x86_64-avx512-linux running on avx512-intel64 while building clang at step 12 "setup lit".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/9735

Here is the relevant piece of the build log for the reference
Step 12 (setup lit) failure: '/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/test/sandbox/bin/python /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/test/lnt/setup.py ...' (failure)
...
no previously-included directories found matching 'tests/*/Output'
no previously-included directories found matching 'tests/*/*/Output'
adding license file 'LICENSE.TXT'
writing manifest file 'LNT.egg-info/SOURCES.txt'
running build_ext
copying build/lib.linux-x86_64-cpython-39/lnt/testing/profile/cPerf.cpython-39-x86_64-linux-gnu.so -> lnt/testing/profile
Creating /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/test/sandbox/lib64/python3.9/site-packages/LNT.egg-link (link to .)
Adding LNT 0.4.2.dev0 to easy-install.pth file
Installing lnt script to /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/test/sandbox/bin

Installed /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/test/lnt
Processing dependencies for LNT==0.4.2.dev0
Searching for certifi
Reading https://pypi.org/simple/certifi/
Downloading https://files.pythonhosted.org/packages/a5/32/8f6669fc4798494966bf446c8c4a162e0b5d893dff088afddf76414f70e1/certifi-2024.12.14-py3-none-any.whl#sha256=1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56
Best match: certifi 2024.12.14
Processing certifi-2024.12.14-py3-none-any.whl
Installing certifi-2024.12.14-py3-none-any.whl to /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/test/sandbox/lib64/python3.9/site-packages
Adding certifi 2024.12.14 to easy-install.pth file

Installed /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/test/sandbox/lib64/python3.9/site-packages/certifi-2024.12.14-py3.9.egg
Searching for lit==0.11.1
Reading https://pypi.org/simple/lit/
Downloading https://files.pythonhosted.org/packages/c8/20/a1c3f83acd15874d953b26f87d94d92bde23d614a711c9e75f60744df2f3/lit-0.11.1-py3-none-any.whl#sha256=4fa0cafcedf9e278d4ffa69bfa1a0482db41fdb1d055c8b9fc29501511abeb16
Best match: lit 0.11.1
Processing lit-0.11.1-py3-none-any.whl
Installing lit-0.11.1-py3-none-any.whl to /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/test/sandbox/lib64/python3.9/site-packages
Adding lit 0.11.1 to easy-install.pth file
detected new path './certifi-2024.12.14-py3.9.egg'
Installing lit script to /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/test/sandbox/bin

Installed /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/test/sandbox/lib64/python3.9/site-packages/lit-0.11.1-py3.9.egg
Searching for requests
Reading https://pypi.org/simple/requests/
Downloading https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl#sha256=70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6
Best match: requests 2.32.3
Processing requests-2.32.3-py3-none-any.whl
Installing requests-2.32.3-py3-none-any.whl to /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/test/sandbox/lib64/python3.9/site-packages
Adding requests 2.32.3 to easy-install.pth file
detected new path './lit-0.11.1-py3.9.egg'

Installed /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/test/sandbox/lib64/python3.9/site-packages/requests-2.32.3-py3.9.egg
Searching for pyyaml==5.1.2
Reading https://pypi.org/simple/pyyaml/
Download error on https://pypi.org/simple/pyyaml/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'pyyaml' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.org/simple/
No local packages or working download links found for pyyaml==5.1.2
error: Could not find suitable distribution for Requirement.parse('pyyaml==5.1.2')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants