r195526 - Remove uninstantiable constructor from DeclTemplate.h

Peter Collingbourne peter at pcc.me.uk
Fri Nov 22 16:42:43 PST 2013


Author: pcc
Date: Fri Nov 22 18:42:43 2013
New Revision: 195526

URL: http://llvm.org/viewvc/llvm-project?rev=195526&view=rev
Log:
Remove uninstantiable constructor from DeclTemplate.h

Patch by Kim Gräsman!

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.

Differential Revision: http://llvm-reviews.chandlerc.com/D2246

Modified:
    cfe/trunk/include/clang/AST/DeclTemplate.h

Modified: cfe/trunk/include/clang/AST/DeclTemplate.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclTemplate.h?rev=195526&r1=195525&r2=195526&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclTemplate.h (original)
+++ cfe/trunk/include/clang/AST/DeclTemplate.h Fri Nov 22 18:42:43 2013
@@ -564,7 +564,6 @@ protected:
     SetIteratorType SetIter;
 
   public:
-    SpecIterator() : SetIter() {}
     SpecIterator(SetIteratorType SetIter) : SetIter(SetIter) {}
 
     DeclType *operator*() const {





More information about the cfe-commits mailing list