[llvm] r244164 - Add a TrailingObjects template class.

Yaron Keren via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 01:31:35 PDT 2015


Visual C++ 2013 update 5 did not like this either, fixed in r244199.

2015-08-06 10:04 GMT+03:00 İsmail Dönmez <llvm-commits at lists.llvm.org>:

> Hi,
>
> On Thu, Aug 6, 2015 at 1:57 AM, James Y Knight <jyknight at google.com>
> wrote:
> > Author: jyknight
> > Date: Wed Aug  5 17:57:34 2015
> > New Revision: 244164
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=244164&view=rev
> > Log:
> > Add a TrailingObjects template class.
> >
> > This is intended to help support the idiom of a class that has some
> > other objects (or multiple arrays of different types of objects)
> > appended on the end, which is used quite heavily in clang.
> >
> > Differential Revision: http://reviews.llvm.org/D11272
> >
> > Added:
> >     llvm/trunk/include/llvm/Support/TrailingObjects.h
> >     llvm/trunk/unittests/Support/TrailingObjectsTest.cpp
>
>
> Looks like VS2015 doesn't like this (on x64) :
>
> FAILED: C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\cl.exe   /nologo /TP
> /DWIN32 /D_WINDOWS   -wd4146 -wd4180 -wd4244 -wd4258 -wd4267 -wd4291
> -wd4345 -wd4351 -wd4355 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503
> -wd4624 -wd4722 -wd4800 -wd4100 -wd4127 -wd4512 -w
> d4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703
> -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd432
> 4 -w14062 -we4238 /W4 /Zc:sizedDealloc- /MT /O2 /Ob2
> -Iunittests\Support -I..\unittests\Support -Iinclude -I..\include
> -I..\
> utils\unittest\googletest\include    -UNDEBUG /EHs-c- /GR-
> /showIncludes -DGTEST_HAS_RTTI=0 -D_CRT_NONSTDC_NO_DEPRECATE -D_C
> RT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE
> -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0
> -D_SCL_SECURE_NO_DEPRECATE -
> D_SCL_SECURE_NO_WARNINGS -D__STDC_CONSTANT_MACROS
> -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
> /Founittests\Support\CMakeFil
> es\SupportTests.dir\TrailingObjectsTest.cpp.obj
> /Fdunittests\Support\CMakeFiles\SupportTests.dir\ /FS -c
> ..\unittests\Suppor
> t\TrailingObjectsTest.cpp
> ..\unittests\Support\TrailingObjectsTest.cpp(43): error C2876:
> 'llvm::TrailingObjects<`anonymous-namespace'::Class1,short,ll
> vm::NoTrailingTypeArg>': not all overloads are accessible
> ..\unittests\Support\TrailingObjectsTest.cpp(44): error C2876:
> 'llvm::TrailingObjects<`anonymous-namespace'::Class1,short,ll
> vm::NoTrailingTypeArg>': not all overloads are accessible
> ..\unittests\Support\TrailingObjectsTest.cpp(45): error C2876:
> 'llvm::TrailingObjects<`anonymous-namespace'::Class1,short,ll
> vm::NoTrailingTypeArg>': not all overloads are accessible
> ..\unittests\Support\TrailingObjectsTest.cpp(94): error C2876:
> 'llvm::TrailingObjects<`anonymous-namespace'::Class2,double,s
> hort>': not all overloads are accessible
> ..\unittests\Support\TrailingObjectsTest.cpp(95): error C2876:
> 'llvm::TrailingObjects<`anonymous-namespace'::Class2,double,s
> hort>': not all overloads are accessible
> ..\unittests\Support\TrailingObjectsTest.cpp(96): error C2876:
> 'llvm::TrailingObjects<`anonymous-namespace'::Class2,double,s
> hort>': not all overloads are accessible
> ..\unittests\Support\TrailingObjectsTest.cpp(103): 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>'
> ..\include\llvm/Support/TrailingObjects.h(219): note: see declaration
> of 'llvm::TrailingObjects<`anonymous-namespace'::Class
> 1,short,llvm::NoTrailingTypeArg>::additionalSizeToAlloc> Modified:
> [...]
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150806/1ff7446b/attachment.html>


More information about the llvm-commits mailing list