[llvm] r259943 - Attempt to work around an MSVC rejects-valid. Apparently it gets the access
Richard Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 5 14:48:19 PST 2016
Author: rsmith
Date: Fri Feb 5 16:48:19 2016
New Revision: 259943
URL: http://llvm.org/viewvc/llvm-project?rev=259943&view=rev
Log:
Attempt to work around an MSVC rejects-valid. Apparently it gets the access
check wrong when inheriting a member through two levels of private inheritance,
where the middle one is a class template specialization.
Modified:
llvm/trunk/include/llvm/Support/TrailingObjects.h
Modified: llvm/trunk/include/llvm/Support/TrailingObjects.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/TrailingObjects.h?rev=259943&r1=259942&r2=259943&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/TrailingObjects.h (original)
+++ llvm/trunk/include/llvm/Support/TrailingObjects.h Fri Feb 5 16:48:19 2016
@@ -79,11 +79,6 @@ public:
/// The base class for TrailingObjects* classes.
class TrailingObjectsBase {
-public:
- /// Disable sized deallocation for all objects with trailing object storage;
- /// the inferred size will typically not be correct.
- void operator delete(void *P) { return ::operator delete(P); }
-
protected:
/// OverloadToken's purpose is to allow specifying function overloads
/// for different types, without actually taking the types as
@@ -295,10 +290,13 @@ class TrailingObjects : private trailing
}
public:
- // Make these (privately inherited) members public.
- using ParentType::operator delete;
+ // Make this (privately inherited) member public.
using ParentType::OverloadToken;
+ /// Disable sized deallocation for all objects with trailing object storage;
+ /// the inferred size will typically not be correct.
+ void operator delete(void *P) { return ::operator delete(P); }
+
/// Returns a pointer to the trailing object array of the given type
/// (which must be one of those specified in the class template). The
/// array may have zero or more elements in it.
More information about the llvm-commits
mailing list