projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9404497
)
clang-format: Properly match parens of macro parameter lists.
author
Daniel Jasper
<djasper@google.com>
Wed, 19 Apr 2017 06:06:38 +0000
(06:06 +0000)
committer
Daniel Jasper
<djasper@google.com>
Wed, 19 Apr 2017 06:06:38 +0000
(06:06 +0000)
No tests yet, but this will be tested by the upcoming:
https://reviews.llvm.org/D28462
llvm-svn: 300661
clang/lib/Format/TokenAnnotator.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/Format/TokenAnnotator.cpp
b/clang/lib/Format/TokenAnnotator.cpp
index
004800f
..
bbc2d1e
100644
(file)
--- 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;
}