Page MenuHomePhabricator

[OpenMP][NFC] Clang format libomptarget code (src & include)

Authored by jdoerfert on Feb 10 2021, 9:47 AM.



The struct and enum alignments are kept by disabling clang-format for
that code region.

Diff Detail

Event Timeline

jdoerfert created this revision.Feb 10 2021, 9:47 AM
jdoerfert requested review of this revision.Feb 10 2021, 9:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 10 2021, 9:47 AM
Herald added a subscriber: sstefan1. · View Herald Transcript
tianshilei1992 accepted this revision.Feb 10 2021, 9:49 AM


This revision is now accepted and ready to land.Feb 10 2021, 9:49 AM
JonChesterfield accepted this revision.Feb 10 2021, 9:50 AM
JonChesterfield added inline comments.

Probably don't need the extra comment, clang-format off is descriptive.


Hopefully header order is not significant. I think there was something where one header required a definition of a macro before it was included, but that may have been fixed in the changes to debug print.

grokos accepted this revision.Feb 10 2021, 12:57 PM
grokos added inline comments.

You are referring to plugins/common/elf_common/elf_common.h. This header file uses macro DP() without including Debug.h, so Debug.h must have been included in the plugin's source file before elf_common.h. This requirement still exists, so we must be careful if we clang-format the plugins.

jdoerfert added inline comments.Feb 10 2021, 1:15 PM

I guess it will break if we do it wrong ;)

A new line ensures there is no reordering by clang-format.

This revision was landed with ongoing or failed builds.Feb 16 2021, 1:37 PM
This revision was automatically updated to reflect the committed changes.