diff options
author | Daniel Jasper <djasper@google.com> | 2014-11-17 18:42:22 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-11-17 18:42:22 +0000 |
commit | e1e348b857128d824973314943cee02acfe20f9f (patch) | |
tree | a6f1a3ba97cef23877de90c029fda4bce135f1cc /clang/lib/Format/TokenAnnotator.cpp | |
parent | 767e6a4333e6436a8e4ab2302a666f66646f7d14 (diff) | |
download | bcm5719-llvm-e1e348b857128d824973314943cee02acfe20f9f.tar.gz bcm5719-llvm-e1e348b857128d824973314943cee02acfe20f9f.zip |
clang-format: Fix more incorrect pointer detection.
Before:
Constructor() : a(a), b(c, d *e) {}
After:
Constructor() : a(a), b(c, d * e) {}
llvm-svn: 222158
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 864f60dee62..dfd880aa997 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -764,7 +764,7 @@ private: Previous = Previous->Previous) Previous->Type = TT_PointerOrReference; if (Line.MustBeDeclaration) - Contexts.back().IsExpression = Contexts.back().InCtorInitializer; + Contexts.back().IsExpression = Contexts.front().InCtorInitializer; } else if (Current.Previous && Current.Previous->Type == TT_CtorInitializerColon) { Contexts.back().IsExpression = true; |