diff options
author | Daniel Jasper <djasper@google.com> | 2013-02-06 10:57:42 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-02-06 10:57:42 +0000 |
commit | 6b5ba8be528bf614d5f4477a4cdbd7c3b19714a6 (patch) | |
tree | a567bf57c019b190b83dc138e024119f2b7837f7 /lib/Format/TokenAnnotator.cpp | |
parent | cf87bffc346244f0ed8eae7fffb52a0f03cd0413 (diff) |
Fix an issue with the formatting of stars in default values.
Before: void f(int *a = d *e, int b = 0);
After: void f(int *a = d * e, int b = 0);
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174500 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/TokenAnnotator.cpp')
-rw-r--r-- | lib/Format/TokenAnnotator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Format/TokenAnnotator.cpp b/lib/Format/TokenAnnotator.cpp index ca8d595df7..1a55985905 100644 --- a/lib/Format/TokenAnnotator.cpp +++ b/lib/Format/TokenAnnotator.cpp @@ -519,7 +519,7 @@ private: if (getPrecedence(Current) == prec::Assignment) { Contexts.back().IsExpression = true; AnnotatedToken *Previous = Current.Parent; - while (Previous != NULL) { + while (Previous != NULL && Previous->isNot(tok::comma)) { if (Previous->Type == TT_BinaryOperator && (Previous->is(tok::star) || Previous->is(tok::amp))) { Previous->Type = TT_PointerOrReference; |