[PATCH] D92753: [clang-format] Add IndentPragma style to eliminate common clang-format off scenario

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 7 06:16:27 PST 2020


MyDeveloperDay added a comment.

In D92753#2436852 <https://reviews.llvm.org/D92753#2436852>, @curdeius wrote:

> You've added `messUp` parameter to `verifyFormat`, because, IIUC, pragmas wouldn't be at the desired scope level indentation otherwise.

messUp was pull the line below onto the pragma line, which was then unable to determine when if it should break it

i.e.

  #pragma omp simd
  for (int k = 0; k < 10; k++) {

became

  #pragma omp simd for (int k = 0; k < 10; k++) {

I'm not sure why this occurred, but I assume there is no real token parsing of an #pragam line.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92753/new/

https://reviews.llvm.org/D92753



More information about the cfe-commits mailing list