This is an archive of the discontinued LLVM Phabricator instance.

[llvm] Replacing asserts with static_asserts where appropriate
ClosedPublic

Authored by eszasip on Mar 14 2015, 11:10 AM.

Details

Summary

This patch consists of the suggestions of clang-tidy/misc-static-assert check.

Diff Detail

Event Timeline

eszasip updated this revision to Diff 21989.Mar 14 2015, 11:10 AM
eszasip retitled this revision from to [llvm] Replacing asserts with static_asserts where appropriate.
eszasip updated this object.
eszasip edited the test plan for this revision. (Show Details)
eszasip added a reviewer: alexfh.
eszasip added subscribers: Unknown Object (MLST), xazax.hun.
alexfh accepted this revision.Mar 15 2015, 10:23 AM
alexfh edited edge metadata.

Looks good!

Please have someone commit this for you.

This revision is now accepted and ready to land.Mar 15 2015, 10:23 AM
xazax.hun closed this revision.Mar 16 2015, 2:50 AM

This patch was committed in: r232366.

It looks like this patch fails to compile on windows using msvc: http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc/builds/3291

Unfortunately I do not have access to a msvc compiler. Should I revert the whole patch in this case?

Given that each change is independent, I'd start from reverting the one
where the error appears. It seems that MSVC doesn't understand constexpr on
llvm::array_lengthof.

I did revert that part of the patch in the meantime and it seems to solve the issue.

chfast added a subscriber: chfast.Mar 16 2015, 4:55 AM

Given that each change is independent, I'd start from reverting the one
where the error appears. It seems that MSVC doesn't understand constexpr on
llvm::array_lengthof.

constexpr is one of the biggest missing feature of MSVC. The partial support is expected in Visual Studio 2015.