-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[Clang][Sema] Remove invalid ctor (NFC) #82161
Conversation
- TemplateArgumentLocInventIterator default constructor should not exists, because it doesn't and couldn't initialize 'Self' member that is reference. Instantiation of this ctor is always a compile-time error.
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write If you have received no comments on your PR for a week, you can request a review If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
@llvm/pr-subscribers-clang Author: Alexander (Smertig) Changes
llvm-project/clang/lib/Sema/TreeTransform.h Line 4742 in 3496927
because it doesn't and couldn't initialize Self member that is reference:llvm-project/clang/lib/Sema/TreeTransform.h Lines 4721 to 4723 in 3496927
Instantiation of this constructor is always a compile-time error. Please note, that I didn't run any tests, because cannot imagine situation where this constructor can be properly used. There's no new tests for this fix for the same reason. Full diff: https://github.com/llvm/llvm-project/pull/82161.diff 1 Files Affected:
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index a32a585531873a..07f11c965cde62 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -4739,8 +4739,6 @@ class TemplateArgumentLocInventIterator {
const TemplateArgumentLoc *operator->() const { return &Arg; }
};
- TemplateArgumentLocInventIterator() { }
-
explicit TemplateArgumentLocInventIterator(TreeTransform<Derived> &Self,
InputIterator Iter)
: Self(Self), Iter(Iter) { }
|
Ping? |
Ping? @cor3ntin |
@Smertig Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested Please check whether problems have been caused by your change specifically, as How to do this, and the rest of the post-merge process, is covered in detail here. If your change does cause a problem, it may be reverted, or you can revert it yourself. If you don't get any reports, no action is required from you. Your changes are working as expected, well done! |
`TemplateArgumentLocInventIterator` default constructor should not exists https://github.com/llvm/llvm-project/blob/3496927edcd0685807351ba88a7e2cfb006e1c0d/clang/lib/Sema/TreeTransform.h#L4742 because it doesn't and couldn't initialize `Self` member that is reference: https://github.com/llvm/llvm-project/blob/3496927edcd0685807351ba88a7e2cfb006e1c0d/clang/lib/Sema/TreeTransform.h#L4721-L4723 Instantiation of this constructor is always a compile-time error. Please note, that I didn't run any tests, because cannot imagine situation where this constructor can be properly used. There are no new tests for this fix for the same reason.
TemplateArgumentLocInventIterator
default constructor should not existsllvm-project/clang/lib/Sema/TreeTransform.h
Line 4742 in 3496927
because it doesn't and couldn't initialize
Self
member that is reference:llvm-project/clang/lib/Sema/TreeTransform.h
Lines 4721 to 4723 in 3496927
Instantiation of this constructor is always a compile-time error.
Please note, that I didn't run any tests, because cannot imagine situation where this constructor can be properly used. There are no new tests for this fix for the same reason.