[PATCH] Remove uninstantiable constructor from DeclTemplate.h
Kim Gräsman
kim.grasman at gmail.com
Thu Nov 21 12:05:18 PST 2013
kimgr added you to the CC list for the revision "Remove uninstantiable constructor from DeclTemplate.h".
Hi pcc,
Laszlo Nagy and me both ran into the same issue with SpecIterator from DeclTemplate.h causing an error:
tools/clang/include/clang/AST/DeclTemplate.h:560:22: error:
no matching constructor for initialization of 'SetIteratorType' (aka
'FoldingSetVectorIterator<clang::FunctionTemplateSpecializationInfo,
typename SmallVector<FunctionTemplateSpecializationInfo *, 8>::iterator>')
SpecIterator() : SetIter() {}
(see e.g. http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-November/033642.html)
The problem is the SpecIterator default constructor which needs a non-existent SetIter default constructor. SpecIterator's default constructor is evidently dead code as any call to it would fail with the above error.
This patch removes it.
http://llvm-reviews.chandlerc.com/D2246
Files:
include/clang/AST/DeclTemplate.h
Index: include/clang/AST/DeclTemplate.h
===================================================================
--- include/clang/AST/DeclTemplate.h
+++ include/clang/AST/DeclTemplate.h
@@ -564,7 +564,6 @@
SetIteratorType SetIter;
public:
- SpecIterator() : SetIter() {}
SpecIterator(SetIteratorType SetIter) : SetIter(SetIter) {}
DeclType *operator*() const {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2246.1.patch
Type: text/x-patch
Size: 382 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131121/bd3951ba/attachment.bin>
More information about the cfe-commits
mailing list