diff options
author | Daniel Jasper <djasper@google.com> | 2014-04-14 13:15:29 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-04-14 13:15:29 +0000 |
commit | 866468ae4ddc13a8aa317c08071c55768bae9f50 (patch) | |
tree | dade1b47739b26eaa7a72707683391c6255efa4a /clang/lib/Format | |
parent | cb9c3cfb58373b937742ae8a6b030ea9097be79a (diff) | |
download | bcm5719-llvm-866468ae4ddc13a8aa317c08071c55768bae9f50.tar.gz bcm5719-llvm-866468ae4ddc13a8aa317c08071c55768bae9f50.zip |
clang-format: Fix regression caused by r206165.
llvm-svn: 206173
Diffstat (limited to 'clang/lib/Format')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 410a84ecd2c..c4fa784f2a9 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -111,7 +111,9 @@ private: // static_assert, if and while usually contain expressions. Contexts.back().IsExpression = true; } else if (Line.InPPDirective && - (!Left->Previous || Left->Previous->isNot(tok::identifier))) { + (!Left->Previous || + (Left->Previous->isNot(tok::identifier) && + Left->Previous->Type != TT_OverloadedOperator))) { Contexts.back().IsExpression = true; } else if (Left->Previous && Left->Previous->is(tok::r_square) && Left->Previous->MatchingParen && |