diff options
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
| -rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 902cbb8f44c..a66f1dfcb2d 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -1329,8 +1329,8 @@ unsigned TokenAnnotator::splitPenalty(const AnnotatedLine &Line, return 150; } - if (Right.Type == TT_TrailingAnnotation && Right.Next && - Right.Next->isNot(tok::l_paren)) { + if (Right.Type == TT_TrailingAnnotation && + (!Right.Next || Right.Next->isNot(tok::l_paren))) { // Generally, breaking before a trailing annotation is bad unless it is // function-like. It seems to be especially preferable to keep standard // annotations (i.e. "const", "final" and "override") on the same line. |

