summaryrefslogtreecommitdiff
path: root/clang/lib/Format/WhitespaceManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/WhitespaceManager.cpp')
-rw-r--r--clang/lib/Format/WhitespaceManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Format/WhitespaceManager.cpp b/clang/lib/Format/WhitespaceManager.cpp
index cc3cc0f6906c..ecc696c53922 100644
--- a/clang/lib/Format/WhitespaceManager.cpp
+++ b/clang/lib/Format/WhitespaceManager.cpp
@@ -1295,7 +1295,10 @@ void WhitespaceManager::alignArrayInitializers() {
bool FoundComplete = false;
for (unsigned InsideIndex = ChangeIndex + 1; InsideIndex < ChangeEnd;
++InsideIndex) {
- if (Changes[InsideIndex].Tok == C.Tok->MatchingParen) {
+ const auto *Tok = Changes[InsideIndex].Tok;
+ if (Tok->is(tok::pp_define))
+ break;
+ if (Tok == C.Tok->MatchingParen) {
alignArrayInitializers(ChangeIndex, InsideIndex + 1);
ChangeIndex = InsideIndex + 1;
FoundComplete = true;