From dbb3d042e052d26f9973dbfade318b9f2fe2ac40 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Fri, 29 Nov 2013 08:51:56 +0000 Subject: clang-format: Correctly handle Qt's Q_SLOTS. This should fix llvm.org/PR17241. Maybe it sticks this time :-). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195953 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Format/UnwrappedLineParser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/Format/UnwrappedLineParser.cpp') diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp index 9c0bf2696f..1eb0ae1700 100644 --- a/lib/Format/UnwrappedLineParser.cpp +++ b/lib/Format/UnwrappedLineParser.cpp @@ -1087,7 +1087,8 @@ void UnwrappedLineParser::parseSwitch() { void UnwrappedLineParser::parseAccessSpecifier() { nextToken(); // Understand Qt's slots. - if (FormatTok->is(tok::identifier) && FormatTok->TokenText == "slots") + if (FormatTok->is(tok::identifier) && + (FormatTok->TokenText == "slots" || FormatTok->TokenText == "Q_SLOTS")) nextToken(); // Otherwise, we don't know what it is, and we'd better keep the next token. if (FormatTok->Tok.is(tok::colon)) -- cgit v1.2.3