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

Aaron Ballman aaron at aaronballman.com
Thu Apr 16 07:16:47 PDT 2015


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



More information about the llvm-commits mailing list