Skip to content

Enable clang-format AlignConsecutiveMacros. - #269

Merged
Stephan T. Lavavej (StephanTLavavej) merged 3 commits into
microsoft:masterfrom
StephanTLavavej:clang_format
Nov 7, 2019
Merged

Stephan T. Lavavej (StephanTLavavej) merged 3 commits into
microsoft:masterfrom
StephanTLavavej:clang_format

Conversation

@StephanTLavavej

Copy link
Copy Markdown
Member

Description

  • Update .clang-format defaults.

  • Enable AlignConsecutiveMacros, newly supported by clang-format 9. We often followed this style before using clang-format, and I believe that it produces generally positive changes.

  • Apply clang-format changes.

  • Replace _FITS and _NEXT_ALIGN macros. clang-format didn't damage them, it just brought them to my attention. These macros weren't improving clarity, and the code is more systematic without them. (For the time being, I have refrained from further overhauling the metaprogramming here.)

Checklist

Be sure you've read README.md and understand the scope of this repo.

If you're unsure about a box, leave it unchecked. A maintainer will help you.

  • Identifiers in product code changes are properly _Ugly as per
    https://eel.is/c++draft/lex.name#3.1 or there are no product code changes.
  • The STL builds successfully and all tests have passed (must be manually
    verified by an STL maintainer before automated testing is enabled on GitHub,
    leave this unchecked for initial submission).
  • These changes introduce no known ABI breaks (adding members, renaming
    members, adding virtual functions, changing whether a type is an aggregate
    or trivially copyable, etc.).
  • These changes were written from scratch using only this repository and
    the C++ Working Draft as a reference (and any other cited standards).
    If they were derived from a project that's already listed in NOTICE.txt,
    that's fine, but please mention it. If they were derived from any other
    project (including Boost and libc++, which are not yet listed in
    NOTICE.txt), you must mention it here, so we can determine whether the
    license is compatible and what else needs to be done.

@BillyONeal Billy O'Neal (BillyONeal) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a fan of this alignment for the same reason I'm not a fan of the 'align assignments' setting we've been using. But I care a lot less about how we format stuff than you do, so I guess this is OK.

Comment thread stl/inc/type_traits
Comment thread stl/inc/type_traits
Comment thread stl/src/xtime.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants