[PATCH] D92753: [clang-format] Add IndentPragma style to eliminate common clang-format off scenario
Marek Kurdej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 7 04:34:32 PST 2020
curdeius added a comment.
This LGTM in general. I just have a doubt.
You've added `messUp` parameter to `verifyFormat`, because, IIUC, pragmas wouldn't be at the desired scope level indentation otherwise.
Shouldn't clang-format find out what the correct indentation level for pragmas should be instead of keeping the current indentation (when IndentPragmas: true)?
Correct me if my understanding is wrong.
Anyway, my point is that turning off messUp seems like a bad idea and may hide some problems, nope?
What would be the output of:
void foo() {
#pragma omp
for (...) {
#pragma omp
for (...) {
}
}
}
Do the `#pragma`s get intended to the level of corresponding `for`s or not?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92753/new/
https://reviews.llvm.org/D92753
More information about the cfe-commits
mailing list