[clang] 55ed4e3 - [Clang][Sema] Remove invalid ctor (NFC) (#82161)

via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 20 03:11:29 PDT 2024


Author: Alexander
Date: 2024-04-20T12:11:24+02:00
New Revision: 55ed4e314fb6f2c3e66113931088c36e6bcfca74

URL: https://github.com/llvm/llvm-project/commit/55ed4e314fb6f2c3e66113931088c36e6bcfca74
DIFF: https://github.com/llvm/llvm-project/commit/55ed4e314fb6f2c3e66113931088c36e6bcfca74.diff

LOG: [Clang][Sema] Remove invalid ctor (NFC) (#82161)

`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.

Added: 
    

Modified: 
    clang/lib/Sema/TreeTransform.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index ade33ec65038fd..180574f1cab819 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -4759,8 +4759,6 @@ class TemplateArgumentLocInventIterator {
     const TemplateArgumentLoc *operator->() const { return &Arg; }
   };
 
-  TemplateArgumentLocInventIterator() { }
-
   explicit TemplateArgumentLocInventIterator(TreeTransform<Derived> &Self,
                                              InputIterator Iter)
     : Self(Self), Iter(Iter) { }


        


More information about the cfe-commits mailing list