summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2017-04-19 06:06:38 +0000
committerDaniel Jasper <djasper@google.com>2017-04-19 06:06:38 +0000
commit47d58ea681d9a9f1bbce7e37963d5179f227d7a5 (patch)
tree8cf988a3c59147450387de26c60189238dde4db8 /clang/lib
parent9404497acddc23ed6602ec663d17bb846186c9d6 (diff)
downloadbcm5719-llvm-47d58ea681d9a9f1bbce7e37963d5179f227d7a5.tar.gz
bcm5719-llvm-47d58ea681d9a9f1bbce7e37963d5179f227d7a5.zip
clang-format: Properly match parens of macro parameter lists.
No tests yet, but this will be tested by the upcoming: https://reviews.llvm.org/D28462 llvm-svn: 300661
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 004800fc2a4..bbc2d1e52b6 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -796,10 +796,11 @@ private:
while (CurrentToken) {
FormatToken *Tok = CurrentToken;
next();
- if (Tok->isOneOf(Keywords.kw___has_include,
- Keywords.kw___has_include_next)) {
+ if (Tok->is(tok::l_paren))
+ parseParens();
+ else if (Tok->isOneOf(Keywords.kw___has_include,
+ Keywords.kw___has_include_next))
parseHasInclude();
- }
}
return Type;
}
OpenPOWER on IntegriCloud