Add test data for destructor handling Change-Id: I28a7d970270a5dae6065b82e6f0a069bae93236f
diff --git a/cpp/BUILD b/cpp/BUILD index bd1b545..eb36ab2 100644 --- a/cpp/BUILD +++ b/cpp/BUILD
@@ -18,3 +18,9 @@ name = "pick_shorter", srcs = ["pick_shorter.cc"], ) + +cc_library( + name = "destructor", + srcs = ["has_destructor.cc", "has_destructor.h"], +) +
diff --git a/cpp/has_destructor.cc b/cpp/has_destructor.cc new file mode 100644 index 0000000..042f6c9 --- /dev/null +++ b/cpp/has_destructor.cc
@@ -0,0 +1,19 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "has_destructor.h" + +HasDestructor::~HasDestructor() { + // Don't need to do anything. +}
diff --git a/cpp/has_destructor.h b/cpp/has_destructor.h new file mode 100644 index 0000000..bac472f --- /dev/null +++ b/cpp/has_destructor.h
@@ -0,0 +1,18 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +class HasDestructor { + // Should be decorated with a link to the destructor, not the clsss + ~HasDestructor(); +};