diff options
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r-- | lib/Format/Format.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 1aa7acf3de..120b54d831 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -928,6 +928,10 @@ private: bool spaceRequiredBetween(const AnnotatedToken &Left, const AnnotatedToken &Right) { + if (Right.is(tok::hashhash)) + return Left.is(tok::hash); + if (Left.is(tok::hashhash) || Left.is(tok::hash)) + return Right.is(tok::hash); if (Right.is(tok::r_paren) || Right.is(tok::semi) || Right.is(tok::comma)) return false; if (Left.is(tok::kw_template) && Right.is(tok::less)) @@ -962,8 +966,6 @@ private: return true; if (Left.is(tok::l_paren)) return false; - if (Left.is(tok::hash)) - return false; if (Right.is(tok::l_paren)) { return Left.is(tok::kw_if) || Left.is(tok::kw_for) || Left.is(tok::kw_while) || Left.is(tok::kw_switch) || |