[PATCH] D115068: [clang-format][NFC] Move static variable in scope
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 4 12:30:40 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8d1c85454daa: [clang-format][NFC] Move static variable in scope (authored by HazardyKnusperkeks).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115068/new/
https://reviews.llvm.org/D115068
Files:
clang/lib/Format/ContinuationIndenter.cpp
Index: clang/lib/Format/ContinuationIndenter.cpp
===================================================================
--- clang/lib/Format/ContinuationIndenter.cpp
+++ clang/lib/Format/ContinuationIndenter.cpp
@@ -493,14 +493,14 @@
return true;
}
- // Break after the closing parenthesis of TypeScript decorators before
- // functions, getters and setters.
- static const llvm::StringSet<> BreakBeforeDecoratedTokens = {"get", "set",
- "function"};
if (Style.Language == FormatStyle::LK_JavaScript &&
- BreakBeforeDecoratedTokens.contains(Current.TokenText) &&
Previous.is(tok::r_paren) && Previous.is(TT_JavaAnnotation)) {
- return true;
+ // Break after the closing parenthesis of TypeScript decorators before
+ // functions, getters and setters.
+ static const llvm::StringSet<> BreakBeforeDecoratedTokens = {"get", "set",
+ "function"};
+ if (BreakBeforeDecoratedTokens.contains(Current.TokenText))
+ return true;
}
// If the return type spans multiple lines, wrap before the function name.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115068.391862.patch
Type: text/x-patch
Size: 1178 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211204/845ce796/attachment.bin>
More information about the cfe-commits
mailing list