summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-02-06 10:57:42 +0000
committerDaniel Jasper <djasper@google.com>2013-02-06 10:57:42 +0000
commit8035b0a6ced4dd3f1a0f34e0a027005b53f7753b (patch)
tree11989d2bd6fcffdb3f639ba9496629b772c4621b /clang/lib
parent2cff49e026879ad2f0c24de4a2c3168fb83c663e (diff)
downloadbcm5719-llvm-8035b0a6ced4dd3f1a0f34e0a027005b53f7753b.tar.gz
bcm5719-llvm-8035b0a6ced4dd3f1a0f34e0a027005b53f7753b.zip
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); llvm-svn: 174500
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index ca8d595df76..1a55985905c 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud