summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/TrailingObjectsTest.cpp
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2015-08-06 07:59:26 +0000
committerYaron Keren <yaron.keren@gmail.com>2015-08-06 07:59:26 +0000
commit051eeca08e0944c86a4333e385d8286afb9d70bc (patch)
tree416008d37df4647adeafbfd912cde23b12f0262e /llvm/unittests/Support/TrailingObjectsTest.cpp
parent903c5f9329b0d93396b178c7eb4e24d49223282c (diff)
downloadbcm5719-llvm-051eeca08e0944c86a4333e385d8286afb9d70bc.tar.gz
bcm5719-llvm-051eeca08e0944c86a4333e385d8286afb9d70bc.zip
Fix Visual C++ error C2248:
'llvm::TrailingObjects<`anonymous-namespace'::Class1,short,llvm::NoTrailingTypeArg>::additionalSizeToAlloc' : cannot access protected member declared in class 'llvm::TrailingObjects<`anonymous-namespace'::Class1,short,llvm::NoTrailingTypeArg>' I'm not sure how this compiles with gcc. Aren't protecteded members accessible only with protected or public inheritance? llvm-svn: 244199
Diffstat (limited to 'llvm/unittests/Support/TrailingObjectsTest.cpp')
-rw-r--r--llvm/unittests/Support/TrailingObjectsTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/Support/TrailingObjectsTest.cpp b/llvm/unittests/Support/TrailingObjectsTest.cpp
index fe1fbf15307..41e2d4181f5 100644
--- a/llvm/unittests/Support/TrailingObjectsTest.cpp
+++ b/llvm/unittests/Support/TrailingObjectsTest.cpp
@@ -16,7 +16,7 @@ namespace {
// This class, beyond being used by the test case, a nice
// demonstration of the intended usage of TrailingObjects, with a
// single trailing array.
-class Class1 final : private TrailingObjects<Class1, short> {
+class Class1 final : protected TrailingObjects<Class1, short> {
friend TrailingObjects;
unsigned NumShorts;
@@ -47,7 +47,7 @@ public:
// Here, there are two singular optional object types appended.
// Note that it fails to compile without the alignment spec.
-class LLVM_ALIGNAS(8) Class2 final : private TrailingObjects<Class2, double, short> {
+class LLVM_ALIGNAS(8) Class2 final : protected TrailingObjects<Class2, double, short> {
friend TrailingObjects;
bool HasShort, HasDouble;
OpenPOWER on IntegriCloud