diff options
author | Manuel Klimek <klimek@google.com> | 2013-01-23 14:37:36 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2013-01-23 14:37:36 +0000 |
commit | 7ccbc2156bfe473f080b585130d70e51c4b62bb0 (patch) | |
tree | 660cb88969861cf7bb5728a6e1f7545b143d134f /lib/Format/UnwrappedLineParser.cpp | |
parent | a32a7fda316289dca6aac1352fde3caf14a1cb2f (diff) |
Fix handling of macro definitions.
Now correctly formats:
#define A (1)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173264 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/UnwrappedLineParser.cpp')
-rw-r--r-- | lib/Format/UnwrappedLineParser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp index 1b39442610..ad641a29b1 100644 --- a/lib/Format/UnwrappedLineParser.cpp +++ b/lib/Format/UnwrappedLineParser.cpp @@ -240,7 +240,8 @@ void UnwrappedLineParser::parsePPDefine() { return; } nextToken(); - if (FormatTok.Tok.getKind() == tok::l_paren) { + if (FormatTok.Tok.getKind() == tok::l_paren && + FormatTok.WhiteSpaceLength == 0) { parseParens(); } addUnwrappedLine(); |