diff options
| author | Daniel Jasper <djasper@google.com> | 2014-10-22 08:42:58 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2014-10-22 08:42:58 +0000 |
| commit | e8a4939b77184fc130ed077c92ef57d274b2e414 (patch) | |
| tree | 08f521876b42e7821f8f027271e4ef7d1172dfad /clang/lib/Format | |
| parent | c928de3e8e95ab02418720b765b2342123ade5b8 (diff) | |
| download | bcm5719-llvm-e8a4939b77184fc130ed077c92ef57d274b2e414.tar.gz bcm5719-llvm-e8a4939b77184fc130ed077c92ef57d274b2e414.zip | |
clang-format: Fix incorrect trailing return arrow detection.
Before:
auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa -> f()) {}
After:
auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa->f()) {}
llvm-svn: 220373
Diffstat (limited to 'clang/lib/Format')
| -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 1949510af7b..0f4c2e2d50a 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -779,7 +779,7 @@ private: } else if (Current.is(tok::kw_auto)) { AutoFound = true; } else if (Current.is(tok::arrow) && AutoFound && - Line.MustBeDeclaration) { + Line.MustBeDeclaration && Current.NestingLevel == 0) { Current.Type = TT_TrailingReturnArrow; } else if (Current.isOneOf(tok::star, tok::amp, tok::ampamp)) { Current.Type = |

