summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/UnwrappedLineFormatter.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/UnwrappedLineFormatter.h')
-rw-r--r--clang/lib/Format/UnwrappedLineFormatter.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Format/UnwrappedLineFormatter.h b/clang/lib/Format/UnwrappedLineFormatter.h
index 35626338e38..d7e1f263c56 100644
--- a/clang/lib/Format/UnwrappedLineFormatter.h
+++ b/clang/lib/Format/UnwrappedLineFormatter.h
@@ -105,7 +105,9 @@ private:
Style.Language == FormatStyle::LK_JavaScript)
return 0;
if (RootToken.isAccessSpecifier(false) ||
- RootToken.isObjCAccessSpecifier() || RootToken.is(Keywords.kw_signals))
+ RootToken.isObjCAccessSpecifier() ||
+ (RootToken.is(Keywords.kw_signals) && RootToken.Next &&
+ RootToken.Next->is(tok::colon)))
return Style.AccessModifierOffset;
return 0;
}
OpenPOWER on IntegriCloud