diff options
| author | Daniel Jasper <djasper@google.com> | 2013-11-29 08:51:56 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2013-11-29 08:51:56 +0000 |
| commit | dbb3d042e052d26f9973dbfade318b9f2fe2ac40 (patch) | |
| tree | 5d978aa734b59b70496ef05d65dd9aac79f0c4a5 /lib/Format | |
| parent | 07d0d1ada1867dd9e332649f2ae69401d30bf667 (diff) | |
| download | clang-dbb3d042e052d26f9973dbfade318b9f2fe2ac40.tar.gz clang-dbb3d042e052d26f9973dbfade318b9f2fe2ac40.tar.bz2 clang-dbb3d042e052d26f9973dbfade318b9f2fe2ac40.tar.xz | |
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
Diffstat (limited to 'lib/Format')
| -rw-r--r-- | lib/Format/UnwrappedLineParser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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)) |
