-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[Clang] emit -Wignored-qualifiers diagnostic for cv-qualified base classes #121419
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
Changes from 3 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
3f6b1d6
[Clang] emit -Wignored-qualifiers diagnostic for cv-qualified base cl…
a-tarasyuk 3970973
use explicit variable type
a-tarasyuk 3ffaa3a
Merge branch 'main' of https://github.com/llvm/llvm-project into feat…
a-tarasyuk 3129f75
eliminate template type constraint and add additional tests
a-tarasyuk 346e336
Merge branch 'main' into feat/55474
a-tarasyuk 4da4f21
remove cv-qualifiers from inherited classes in tuple declaration
a-tarasyuk 150a3db
Merge branch 'main' of https://github.com/llvm/llvm-project into feat…
a-tarasyuk 9463177
Merge branch 'feat/55474' of https://github.com/a-tarasyuk/llvm-proje…
a-tarasyuk e83daed
Merge branch 'main' into feat/55474
a-tarasyuk 0c90ff8
update tuple declaration
a-tarasyuk ba6d791
Merge branch 'feat/55474' of https://github.com/a-tarasyuk/llvm-proje…
a-tarasyuk 9ef3687
Merge branch 'feat/55474' of https://github.com/a-tarasyuk/llvm-proje…
a-tarasyuk 3aa2e5f
update tuple declaration
a-tarasyuk db7719f
Merge branch 'main' into feat/55474
a-tarasyuk 096ec86
Merge branch 'main' into feat/55474
a-tarasyuk 986922f
Merge branch 'main' into feat/55474
a-tarasyuk f9ddb2e
Merge branch 'main' into feat/55474
a-tarasyuk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // RUN: %clang_cc1 %s -std=c++11 -Wignored-qualifiers -verify | ||
|
|
||
| class A { }; | ||
|
|
||
| typedef const A A_Const; | ||
| class B : public A_Const { }; // expected-warning {{'const' qualifier on base class type 'A_Const' (aka 'const A') have no effect}} \ | ||
| // expected-note {{base class 'A_Const' (aka 'const A') specified here}} | ||
|
|
||
| typedef const volatile A A_Const_Volatile; | ||
| class C : public A_Const_Volatile { }; // expected-warning {{'const volatile' qualifiers on base class type 'A_Const_Volatile' (aka 'const volatile A') have no effect}} \ | ||
| // expected-note {{base class 'A_Const_Volatile' (aka 'const volatile A') specified here}} | ||
|
|
||
| struct D { | ||
| D(int); | ||
| }; | ||
| template <typename T> struct E : T { | ||
a-tarasyuk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
a-tarasyuk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| using T::T; | ||
| E(int &) : E(0) {} | ||
| }; | ||
| E<const D> e(1); | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.