llvm.org GIT mirror llvm / 1df9ce8
Protect the ArgList dtor It could even be made non-virtual if it weren't for bad compiler warnings. This demonstrates that ArgList objects aren't destroyed polymorphically and possibly that they aren't even used polymorphically. If that's the case, it might be possible to refactor the two ArgList types more separately and simplify the Arg ownership model. *continues experimenting* git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206727 91177308-0d34-0410-b5e6-96231b3b80d8 David Blaikie 6 years ago
2 changed file(s) with 7 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
105105 arglist_type Args;
106106
107107 protected:
108 ArgList();
109
110 public:
108 // Default ctor provided explicitly as it is not provided implicitly due to
109 // the presence of the (deleted) copy ctor above.
110 ArgList() { }
111 // Virtual to provide a vtable anchor and because -Wnon-virtua-dtor warns, not
112 // because this type is ever actually destroyed polymorphically.
111113 virtual ~ArgList();
114
115 public:
112116
113117 /// @name Arg Access
114118 /// @{
3030 (Id2.isValid() && O.matches(Id2)))
3131 break;
3232 }
33 }
34
35 //
36
37 ArgList::ArgList() {
3833 }
3934
4035 ArgList::~ArgList() {