[PATCH] Again macros without trailing semicolons: don't care about declaration context.
Alexander Kornienko
alexfh at google.com
Tue Apr 9 03:04:44 PDT 2013
Hi djasper, klimek,
Some codebases use these kinds of macros in functions, e.g. Chromium's
IPC_BEGIN_MESSAGE_MAP, IPC_BEGIN_MESSAGE_HANDLER, etc.
http://llvm-reviews.chandlerc.com/D645
Files:
lib/Format/UnwrappedLineParser.cpp
Index: lib/Format/UnwrappedLineParser.cpp
===================================================================
--- lib/Format/UnwrappedLineParser.cpp
+++ lib/Format/UnwrappedLineParser.cpp
@@ -386,11 +386,10 @@
parseLabel();
return;
}
- // Recognize function-like macro usages without trailing semicolon in
- // declaration context.
+ // Recognize function-like macro usages without trailing semicolon.
if (FormatTok.Tok.is(tok::l_paren)) {
parseParens();
- if (Line->MustBeDeclaration && FormatTok.HasUnescapedNewline) {
+ if (FormatTok.HasUnescapedNewline) {
addUnwrappedLine();
return;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D645.1.patch
Type: text/x-patch
Size: 717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130409/cca0e58b/attachment.bin>
More information about the cfe-commits
mailing list