[llvm] r234343 - Enable W4 warnings by default for MSVC builds

Yaron Keren yaron.keren at gmail.com
Thu Apr 16 07:49:00 PDT 2015


/W3 was probably cached from the previous build.

So should we disable C4324 or fix (how?) the AlignOf?


2015-04-16 17:34 GMT+03:00 Aaron Ballman <aaron at aaronballman.com>:

> It seems that in order to trigger this, you have to have done a clean
> cmake build, as I am now seeing the same warnings you are.
>
> ~Aaron
>
> On Thu, Apr 16, 2015 at 10:16 AM, Aaron Ballman <aaron at aaronballman.com>
> wrote:
> > On Thu, Apr 16, 2015 at 10:03 AM, Yaron Keren <yaron.keren at gmail.com>
> wrote:
> >> It is same in the IDE and command line, Release or Debug (unthreaded),
> 32
> >> bit.
> >> The warning is:
> >>
> >>   PPMacroExpansion.cpp
> >> c:\llvm\include\llvm/Support/AlignOf.h(25): warning C4324:
> >> 'llvm::AlignmentCalcImpl<T>' : structure was padded due to
> >> __declspec(align()) [c:\llvm\msvc\tools\clang\lib\Lex\clangLex.vcxproj]
> >>           with
> >>           [
> >>               T=clang::SrcMgr::ContentCache
> >>           ] (c:\llvm\tools\clang\lib\Lex\PPCaching.cpp)
> >>           c:\llvm\include\llvm/Support/AlignOf.h(40) : see reference to
> >> class template instantiation 'llvm::AlignmentC
> >>   alcImpl<T>' being compiled
> >>           with
> >>           [
> >>               T=clang::SrcMgr::ContentCache
> >>           ]
> >>           c:\llvm\tools\clang\include\clang/Basic/SourceManager.h(225)
> : see
> >> reference to class template instantiation
> >>    'llvm::AlignOf<clang::SrcMgr::ContentCache>' being compiled
> >>
> >> referring to SourceManager.h(225):
> >>
> >>   static_assert(llvm::AlignOf<ContentCache>::Alignment >= 8,
> >>                 "ContentCache must be 8-byte aligned.");
> >>
> >> And appears whenever SourceManager.h is included, a lot.
> >>
> >> The compiler is Microsoft Visual Studio Ultimate 2013,  Version
> >> 12.0.31101.00 Update 4.
> >>
> >> I'll try threaded build now.
> >
> > I will do a clean rebuild from scratch; I wonder if the reason I'm not
> > seeing anything is because of some caching somewhere. Thank you!
> >
> > ~Aaron
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150416/7ff5828e/attachment.html>


More information about the llvm-commits mailing list