Skip to content

Commit

Permalink
[Clang][Sema] Remove invalid ctor (NFC) (#82161)
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
Smertig committed Apr 20, 2024
1 parent a4422a5 commit 55ed4e3
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions clang/lib/Sema/TreeTransform.h
Original file line number Diff line number Diff line change
Expand Up @@ -4759,8 +4759,6 @@ class TemplateArgumentLocInventIterator {
const TemplateArgumentLoc *operator->() const { return &Arg; }
};

TemplateArgumentLocInventIterator() { }

explicit TemplateArgumentLocInventIterator(TreeTransform<Derived> &Self,
InputIterator Iter)
: Self(Self), Iter(Iter) { }
Expand Down

0 comments on commit 55ed4e3

Please sign in to comment.