diff options
author | Daniel Jasper <djasper@google.com> | 2013-11-23 17:53:41 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-11-23 17:53:41 +0000 |
commit | 84c47a10741c7be02ac448833f32beaf53c0abde (patch) | |
tree | 4eddf16b345364779beeeee750f5eff2d5e0c738 /clang/lib/Format/UnwrappedLineParser.cpp | |
parent | edaa444bda3fdfdf03a25ccbce4aa040bb6cccd0 (diff) | |
download | bcm5719-llvm-84c47a10741c7be02ac448833f32beaf53c0abde.tar.gz bcm5719-llvm-84c47a10741c7be02ac448833f32beaf53c0abde.zip |
clang-format: Support Qt's slot access specifiers.
This fixes llvm.org/PR17241.
llvm-svn: 195555
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
-rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index 016c4db07bf..9c0bf2696fd 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -1086,6 +1086,9 @@ void UnwrappedLineParser::parseSwitch() { void UnwrappedLineParser::parseAccessSpecifier() { nextToken(); + // Understand Qt's slots. + if (FormatTok->is(tok::identifier) && FormatTok->TokenText == "slots") + nextToken(); // Otherwise, we don't know what it is, and we'd better keep the next token. if (FormatTok->Tok.is(tok::colon)) nextToken(); |