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 | 1556b5933848fe363811a1e71ac04a5f9c4802b2 (patch) | |
tree | 072bedb328644d02fc93eb69013ed1e0bd7e711a /clang/lib/Format/UnwrappedLineParser.cpp | |
parent | e40caf9ad2e0566f8293fc704379db75edf08cf6 (diff) | |
download | bcm5719-llvm-1556b5933848fe363811a1e71ac04a5f9c4802b2.tar.gz bcm5719-llvm-1556b5933848fe363811a1e71ac04a5f9c4802b2.zip |
clang-format: Correctly handle Qt's Q_SLOTS.
This should fix llvm.org/PR17241. Maybe it sticks this time :-).
llvm-svn: 195953
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
-rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index 9c0bf2696fd..1eb0ae17007 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/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)) |