Skip to content

Commit 7f881a2

Browse files
jaredgrubbowenca
authored andcommitted
[clang-format] Treat AttributeMacro more like __attribute__
There are two parts to this fix: - Annotate the paren after an AttributeMacro as an AttributeLParen. - Treat an AttributeMacro-without-paren the same as one with a paren. I added a new test-case to differentiate a macro that is or is-not an AttributeMacro; also handled whether ColumnLimit is set to infinite (0) or a finite value, as part of this patch is in ContinuationIndenter. Closes #68722. Differential Revision: https://reviews.llvm.org/D145262
1 parent 6c7cf74 commit 7f881a2

File tree

5 files changed

+336
-4
lines changed

5 files changed

+336
-4
lines changed

clang/lib/Format/ContinuationIndenter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,6 +1335,8 @@ unsigned ContinuationIndenter::getNewLineColumn(const LineState &State) {
13351335
if ((PreviousNonComment &&
13361336
(PreviousNonComment->ClosesTemplateDeclaration ||
13371337
PreviousNonComment->ClosesRequiresClause ||
1338+
(PreviousNonComment->is(TT_AttributeMacro) &&
1339+
Current.isNot(tok::l_paren)) ||
13381340
PreviousNonComment->isOneOf(
13391341
TT_AttributeRParen, TT_AttributeSquare, TT_FunctionAnnotationRParen,
13401342
TT_JavaAnnotation, TT_LeadingJavaAnnotation))) ||

clang/lib/Format/TokenAnnotator.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4393,8 +4393,10 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line,
43934393
return false;
43944394
}
43954395
// Space in __attribute__((attr)) ::type.
4396-
if (Left.is(TT_AttributeRParen) && Right.is(tok::coloncolon))
4396+
if (Left.isOneOf(TT_AttributeRParen, TT_AttributeMacro) &&
4397+
Right.is(tok::coloncolon)) {
43974398
return true;
4399+
}
43984400

43994401
if (Left.is(tok::kw_operator))
44004402
return Right.is(tok::coloncolon);
@@ -4709,7 +4711,8 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line,
47094711
if (Line.Type == LT_ObjCMethodDecl) {
47104712
if (Left.is(TT_ObjCMethodSpecifier))
47114713
return true;
4712-
if (Left.is(tok::r_paren) && canBeObjCSelectorComponent(Right)) {
4714+
if (Left.is(tok::r_paren) && Left.isNot(TT_AttributeRParen) &&
4715+
canBeObjCSelectorComponent(Right)) {
47134716
// Don't space between ')' and <id> or ')' and 'new'. 'new' is not a
47144717
// keyword in Objective-C, and '+ (instancetype)new;' is a standard class
47154718
// method declaration.
@@ -5222,8 +5225,10 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line,
52225225
}
52235226

52245227
// Ensure wrapping after __attribute__((XX)) and @interface etc.
5225-
if (Left.is(TT_AttributeRParen) && Right.is(TT_ObjCDecl))
5228+
if (Left.isOneOf(TT_AttributeRParen, TT_AttributeMacro) &&
5229+
Right.is(TT_ObjCDecl)) {
52265230
return true;
5231+
}
52275232

52285233
if (Left.is(TT_LambdaLBrace)) {
52295234
if (IsFunctionArgument(Left) &&

clang/unittests/Format/FormatTest.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11674,6 +11674,9 @@ TEST_F(FormatTest, UnderstandsAttributes) {
1167411674
verifyFormat("vector<SomeType __attr1 *const> v;", CustomAttrs);
1167511675
verifyFormat("vector<SomeType __attr1 *__attr2> v;", CustomAttrs);
1167611676
verifyFormat("vector<SomeType __attr1 *no_underscore_attr> v;", CustomAttrs);
11677+
verifyFormat("__attr1 ::qualified_type f();", CustomAttrs);
11678+
verifyFormat("__attr1() ::qualified_type f();", CustomAttrs);
11679+
verifyFormat("__attr1(nodebug) ::qualified_type f();", CustomAttrs);
1167711680

1167811681
// Check that these are not parsed as function declarations:
1167911682
CustomAttrs.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None;

clang/unittests/Format/FormatTestObjC.cpp

Lines changed: 213 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,10 @@ TEST_F(FormatTestObjC, IfNotUnlikely) {
15271527
" [obj func:arg2];");
15281528
}
15291529

1530-
TEST_F(FormatTestObjC, Attributes) {
1530+
TEST_F(FormatTestObjC, AttributesOnObjCDecl) {
1531+
Style.AttributeMacros.push_back("ATTRIBUTE_MACRO");
1532+
1533+
// Check '__attribute__' macro directly.
15311534
verifyFormat("__attribute__((objc_subclassing_restricted))\n"
15321535
"@interface Foo\n"
15331536
"@end");
@@ -1537,6 +1540,215 @@ TEST_F(FormatTestObjC, Attributes) {
15371540
verifyFormat("__attribute__((objc_subclassing_restricted))\n"
15381541
"@implementation Foo\n"
15391542
"@end");
1543+
1544+
// Check AttributeMacro gets treated the same, with or without parentheses.
1545+
verifyFormat("ATTRIBUTE_MACRO\n"
1546+
"@interface Foo\n"
1547+
"@end");
1548+
verifyFormat("ATTRIBUTE_MACRO(X)\n"
1549+
"@interface Foo\n"
1550+
"@end");
1551+
1552+
// Indenter also needs to understand multiple attribute macros.
1553+
// Try each of the three kinds paired with each of the other kind.
1554+
1555+
// Column limit, but no reflow.
1556+
verifyFormat("ATTRIBUTE_MACRO(X) ATTRIBUTE_MACRO\n"
1557+
"@interface Foo\n"
1558+
"@end");
1559+
verifyFormat("ATTRIBUTE_MACRO ATTRIBUTE_MACRO(X)\n"
1560+
"@interface Foo\n"
1561+
"@end");
1562+
verifyFormat("__attribute__((X)) ATTRIBUTE_MACRO\n"
1563+
"@interface Foo\n"
1564+
"@end");
1565+
verifyFormat("ATTRIBUTE_MACRO __attribute__((X))\n"
1566+
"@interface Foo\n"
1567+
"@end");
1568+
verifyFormat("__attribute__((X)) ATTRIBUTE_MACRO(X)\n"
1569+
"@interface Foo\n"
1570+
"@end");
1571+
verifyFormat("ATTRIBUTE_MACRO(X) __attribute__((X))\n"
1572+
"@interface Foo\n"
1573+
"@end");
1574+
1575+
// Column limit that requires reflow.
1576+
Style.ColumnLimit = 30;
1577+
verifyFormat("ATTRIBUTE_MACRO(X)\n"
1578+
"ATTRIBUTE_MACRO\n"
1579+
"@interface Foo\n"
1580+
"@end");
1581+
verifyFormat("ATTRIBUTE_MACRO\n"
1582+
"ATTRIBUTE_MACRO(X)\n"
1583+
"@interface Foo\n"
1584+
"@end");
1585+
verifyFormat("__attribute__((X))\n"
1586+
"ATTRIBUTE_MACRO\n"
1587+
"@interface Foo\n"
1588+
"@end");
1589+
verifyFormat("ATTRIBUTE_MACRO\n"
1590+
"__attribute__((X))\n"
1591+
"@interface Foo\n"
1592+
"@end");
1593+
verifyFormat("__attribute__((X))\n"
1594+
"ATTRIBUTE_MACRO(X)\n"
1595+
"@interface Foo\n"
1596+
"@end");
1597+
verifyFormat("ATTRIBUTE_MACRO(X)\n"
1598+
"__attribute__((X))\n"
1599+
"@interface Foo\n"
1600+
"@end");
1601+
1602+
// No column limit
1603+
Style.ColumnLimit = 0;
1604+
verifyFormat("ATTRIBUTE_MACRO(X) ATTRIBUTE_MACRO\n"
1605+
"@interface Foo\n"
1606+
"@end");
1607+
verifyFormat("ATTRIBUTE_MACRO ATTRIBUTE_MACRO(X)\n"
1608+
"@interface Foo\n"
1609+
"@end");
1610+
verifyFormat("__attribute__((X)) ATTRIBUTE_MACRO\n"
1611+
"@interface Foo\n"
1612+
"@end");
1613+
verifyFormat("ATTRIBUTE_MACRO __attribute__((X))\n"
1614+
"@interface Foo\n"
1615+
"@end");
1616+
verifyFormat("__attribute__((X)) ATTRIBUTE_MACRO(X)\n"
1617+
"@interface Foo\n"
1618+
"@end");
1619+
verifyFormat("ATTRIBUTE_MACRO(X) __attribute__((X))\n"
1620+
"@interface Foo\n"
1621+
"@end");
1622+
}
1623+
1624+
TEST_F(FormatTestObjC, AttributesOnObjCMethodDecl) {
1625+
Style.AttributeMacros.push_back("ATTRIBUTE_MACRO");
1626+
1627+
// Check '__attribute__' macro directly.
1628+
verifyFormat("- (id)init __attribute__((objc_designated_initializer));");
1629+
1630+
// Check AttributeMacro gets treated the same, with or without parentheses.
1631+
verifyFormat("- (id)init ATTRIBUTE_MACRO;");
1632+
verifyFormat("- (id)init ATTRIBUTE_MACRO(X);");
1633+
1634+
// Indenter also needs to understand multiple attribute macros.
1635+
1636+
// Column limit (default), but no reflow.
1637+
verifyFormat("- (id)init ATTRIBUTE_MACRO(X) ATTRIBUTE_MACRO;");
1638+
verifyFormat("- (id)init ATTRIBUTE_MACRO ATTRIBUTE_MACRO(X);");
1639+
verifyFormat("- (id)init __attribute__((X)) ATTRIBUTE_MACRO;");
1640+
verifyFormat("- (id)init ATTRIBUTE_MACRO __attribute__((X));");
1641+
verifyFormat("- (id)init __attribute__((X)) ATTRIBUTE_MACRO(X);");
1642+
verifyFormat("- (id)init ATTRIBUTE_MACRO(X) __attribute__((X));");
1643+
1644+
// Column limit that requires reflow.
1645+
Style.ColumnLimit = 30;
1646+
1647+
// Reflow after method name.
1648+
verifyFormat("- (id)initWithReallyLongName\n"
1649+
" __attribute__((X))\n"
1650+
" ATTRIBUTE_MACRO;");
1651+
verifyFormat("- (id)initWithReallyLongName\n"
1652+
" ATTRIBUTE_MACRO(X)\n"
1653+
" ATTRIBUTE_MACRO;");
1654+
verifyFormat("- (id)initWithReallyLongName\n"
1655+
" ATTRIBUTE_MACRO\n"
1656+
" ATTRIBUTE_MACRO;");
1657+
// Reflow after first macro.
1658+
// FIXME: these should indent but don't.
1659+
#if 0
1660+
verifyFormat("- (id)init ATTRIBUTE_MACRO(X)\n"
1661+
" ATTRIBUTE_MACRO;");
1662+
verifyFormat("- (id)init ATTRIBUTE_MACRO\n"
1663+
" ATTRIBUTE_MACRO(X);");
1664+
verifyFormat("- (id)init __attribute__((X))\n"
1665+
" ATTRIBUTE_MACRO;");
1666+
verifyFormat("- (id)init ATTRIBUTE_MACRO\n"
1667+
" __attribute__((X));");
1668+
verifyFormat("- (id)init __attribute__((X))\n"
1669+
" ATTRIBUTE_MACRO(X);");
1670+
verifyFormat("- (id)init ATTRIBUTE_MACRO(X)\n"
1671+
" __attribute__((X));");
1672+
#endif
1673+
1674+
// No column limit.
1675+
Style.ColumnLimit = 0;
1676+
verifyFormat("- (id)init ATTRIBUTE_MACRO(X) ATTRIBUTE_MACRO;");
1677+
verifyFormat("- (id)init ATTRIBUTE_MACRO ATTRIBUTE_MACRO(X);");
1678+
verifyFormat("- (id)init __attribute__((X)) ATTRIBUTE_MACRO;");
1679+
verifyFormat("- (id)init ATTRIBUTE_MACRO __attribute__((X));");
1680+
verifyFormat("- (id)init __attribute__((X)) ATTRIBUTE_MACRO(X);");
1681+
verifyFormat("- (id)init ATTRIBUTE_MACRO(X) __attribute__((X));");
1682+
}
1683+
1684+
TEST_F(FormatTestObjC, AttributesOnObjCProperty) {
1685+
Style.AttributeMacros.push_back("ATTRIBUTE_MACRO");
1686+
1687+
// Check '__attribute__' macro directly.
1688+
verifyFormat("@property(weak) id delegate "
1689+
"__attribute__((objc_designated_initializer));");
1690+
1691+
// Check AttributeMacro gets treated the same, with or without parentheses.
1692+
verifyFormat("@property(weak) id delegate ATTRIBUTE_MACRO;");
1693+
verifyFormat("@property(weak) id delegate ATTRIBUTE_MACRO(X);");
1694+
1695+
// Indenter also needs to understand multiple attribute macros.
1696+
1697+
// Column limit (default), but no reflow.
1698+
verifyFormat(
1699+
"@property(weak) id delegate ATTRIBUTE_MACRO(X) ATTRIBUTE_MACRO;");
1700+
verifyFormat(
1701+
"@property(weak) id delegate ATTRIBUTE_MACRO ATTRIBUTE_MACRO(X);");
1702+
verifyFormat(
1703+
"@property(weak) id delegate __attribute__((X)) ATTRIBUTE_MACRO;");
1704+
verifyFormat(
1705+
"@property(weak) id delegate ATTRIBUTE_MACRO __attribute__((X));");
1706+
verifyFormat(
1707+
"@property(weak) id delegate __attribute__((X)) ATTRIBUTE_MACRO(X);");
1708+
verifyFormat(
1709+
"@property(weak) id delegate ATTRIBUTE_MACRO(X) __attribute__((X));");
1710+
1711+
// Column limit that requires reflow.
1712+
Style.ColumnLimit = 50;
1713+
1714+
// Reflow after method name.
1715+
verifyFormat("@property(weak) id delegateWithLongName\n"
1716+
" __attribute__((X)) ATTRIBUTE_MACRO;");
1717+
verifyFormat("@property(weak) id delegateWithLongName\n"
1718+
" ATTRIBUTE_MACRO(X) ATTRIBUTE_MACRO;");
1719+
verifyFormat("@property(weak) id delegateWithLongName\n"
1720+
" ATTRIBUTE_MACRO ATTRIBUTE_MACRO;");
1721+
// Reflow after first macro.
1722+
// FIXME: these should indent but don't.
1723+
#if 0
1724+
verifyFormat("@property(weak) id delegate ATTRIBUTE_MACRO(X)\n"
1725+
" ATTRIBUTE_MACRO;");
1726+
verifyFormat("@property(weak) id delegate ATTRIBUTE_MACRO\n"
1727+
" ATTRIBUTE_MACRO(X);");
1728+
verifyFormat("@property(weak) id delegate __attribute__((X))\n"
1729+
" ATTRIBUTE_MACRO;");
1730+
verifyFormat("@property(weak) id delegate ATTRIBUTE_MACRO\n"
1731+
" __attribute__((X));");
1732+
verifyFormat("@property(weak) id delegate __attribute__((X))\n"
1733+
" ATTRIBUTE_MACRO(X);");
1734+
verifyFormat("@property(weak) id delegate ATTRIBUTE_MACRO(X)\n"
1735+
" __attribute__((X));");
1736+
#endif
1737+
1738+
// No column limit.
1739+
Style.ColumnLimit = 0;
1740+
verifyFormat(
1741+
"@property(weak) id delegate ATTRIBUTE_MACRO(X) ATTRIBUTE_MACRO;");
1742+
verifyFormat(
1743+
"@property(weak) id delegate ATTRIBUTE_MACRO ATTRIBUTE_MACRO(X);");
1744+
verifyFormat(
1745+
"@property(weak) id delegate __attribute__((X)) ATTRIBUTE_MACRO;");
1746+
verifyFormat(
1747+
"@property(weak) id delegate ATTRIBUTE_MACRO __attribute__((X));");
1748+
verifyFormat(
1749+
"@property(weak) id delegate __attribute__((X)) ATTRIBUTE_MACRO(X);");
1750+
verifyFormat(
1751+
"@property(weak) id delegate ATTRIBUTE_MACRO(X) __attribute__((X));");
15401752
}
15411753

15421754
} // end namespace

clang/unittests/Format/TokenAnnotatorTest.cpp

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,6 +1795,116 @@ TEST_F(TokenAnnotatorTest, UnderstandsTrailingReturnArrow) {
17951795
EXPECT_TOKEN(Tokens[13], tok::arrow, TT_Unknown);
17961796
}
17971797

1798+
TEST_F(TokenAnnotatorTest, UnderstandsAttributeMacros) {
1799+
// '__attribute__' has special handling.
1800+
auto Tokens = annotate("__attribute__(X) void Foo(void);");
1801+
ASSERT_EQ(Tokens.size(), 11u) << Tokens;
1802+
EXPECT_TOKEN(Tokens[0], tok::kw___attribute, TT_Unknown);
1803+
EXPECT_TOKEN(Tokens[1], tok::l_paren, TT_AttributeLParen);
1804+
EXPECT_TOKEN(Tokens[3], tok::r_paren, TT_AttributeRParen);
1805+
1806+
// Generic macro has no special handling in this location.
1807+
Tokens = annotate("A(X) void Foo(void);");
1808+
ASSERT_EQ(Tokens.size(), 11u) << Tokens;
1809+
EXPECT_TOKEN(Tokens[0], tok::identifier, TT_Unknown);
1810+
EXPECT_TOKEN(Tokens[1], tok::l_paren, TT_Unknown);
1811+
1812+
// Add a custom AttributeMacro. Test that it has the same behavior.
1813+
FormatStyle Style = getLLVMStyle();
1814+
Style.AttributeMacros.push_back("A");
1815+
1816+
// An "AttributeMacro" gets annotated like '__attribute__'.
1817+
Tokens = annotate("A(X) void Foo(void);", Style);
1818+
ASSERT_EQ(Tokens.size(), 11u) << Tokens;
1819+
EXPECT_TOKEN(Tokens[0], tok::identifier, TT_AttributeMacro);
1820+
EXPECT_TOKEN(Tokens[1], tok::l_paren, TT_AttributeLParen);
1821+
EXPECT_TOKEN(Tokens[3], tok::r_paren, TT_AttributeRParen);
1822+
}
1823+
1824+
TEST_F(TokenAnnotatorTest, UnderstandsAttributeMacrosOnObjCDecl) {
1825+
// '__attribute__' has special handling.
1826+
auto Tokens = annotate("__attribute__(X) @interface Foo");
1827+
ASSERT_EQ(Tokens.size(), 8u) << Tokens;
1828+
EXPECT_TOKEN(Tokens[0], tok::kw___attribute, TT_Unknown);
1829+
EXPECT_TOKEN(Tokens[1], tok::l_paren, TT_AttributeLParen);
1830+
EXPECT_TOKEN(Tokens[3], tok::r_paren, TT_AttributeRParen);
1831+
1832+
// Generic macro has no special handling in this location.
1833+
Tokens = annotate("A(X) @interface Foo");
1834+
ASSERT_EQ(Tokens.size(), 8u) << Tokens;
1835+
// Note: Don't check token-type as a random token in this position is hard to
1836+
// reason about.
1837+
EXPECT_TOKEN_KIND(Tokens[0], tok::identifier);
1838+
EXPECT_TOKEN_KIND(Tokens[1], tok::l_paren);
1839+
1840+
// Add a custom AttributeMacro. Test that it has the same behavior.
1841+
FormatStyle Style = getLLVMStyle();
1842+
Style.AttributeMacros.push_back("A");
1843+
1844+
// An "AttributeMacro" gets annotated like '__attribute__'.
1845+
Tokens = annotate("A(X) @interface Foo", Style);
1846+
ASSERT_EQ(Tokens.size(), 8u) << Tokens;
1847+
EXPECT_TOKEN(Tokens[0], tok::identifier, TT_AttributeMacro);
1848+
EXPECT_TOKEN(Tokens[1], tok::l_paren, TT_AttributeLParen);
1849+
EXPECT_TOKEN(Tokens[3], tok::r_paren, TT_AttributeRParen);
1850+
}
1851+
1852+
TEST_F(TokenAnnotatorTest, UnderstandsAttributeMacrosOnObjCMethodDecl) {
1853+
// '__attribute__' has special handling.
1854+
auto Tokens = annotate("- (id)init __attribute__(X);");
1855+
ASSERT_EQ(Tokens.size(), 11u) << Tokens;
1856+
EXPECT_TOKEN(Tokens[5], tok::kw___attribute, TT_Unknown);
1857+
EXPECT_TOKEN(Tokens[6], tok::l_paren, TT_AttributeLParen);
1858+
EXPECT_TOKEN(Tokens[8], tok::r_paren, TT_AttributeRParen);
1859+
1860+
// Generic macro has no special handling in this location.
1861+
Tokens = annotate("- (id)init A(X);");
1862+
ASSERT_EQ(Tokens.size(), 11u) << Tokens;
1863+
// Note: Don't check token-type as a random token in this position is hard to
1864+
// reason about.
1865+
EXPECT_TOKEN_KIND(Tokens[5], tok::identifier);
1866+
EXPECT_TOKEN_KIND(Tokens[6], tok::l_paren);
1867+
1868+
// Add a custom AttributeMacro. Test that it has the same behavior.
1869+
FormatStyle Style = getLLVMStyle();
1870+
Style.AttributeMacros.push_back("A");
1871+
1872+
// An "AttributeMacro" gets annotated like '__attribute__'.
1873+
Tokens = annotate("- (id)init A(X);", Style);
1874+
ASSERT_EQ(Tokens.size(), 11u) << Tokens;
1875+
EXPECT_TOKEN(Tokens[5], tok::identifier, TT_AttributeMacro);
1876+
EXPECT_TOKEN(Tokens[6], tok::l_paren, TT_AttributeLParen);
1877+
EXPECT_TOKEN(Tokens[8], tok::r_paren, TT_AttributeRParen);
1878+
}
1879+
1880+
TEST_F(TokenAnnotatorTest, UnderstandsAttributeMacrosOnObjCProperty) {
1881+
// '__attribute__' has special handling.
1882+
auto Tokens = annotate("@property(weak) id delegate __attribute__(X);");
1883+
ASSERT_EQ(Tokens.size(), 13u) << Tokens;
1884+
EXPECT_TOKEN(Tokens[7], tok::kw___attribute, TT_Unknown);
1885+
EXPECT_TOKEN(Tokens[8], tok::l_paren, TT_AttributeLParen);
1886+
EXPECT_TOKEN(Tokens[10], tok::r_paren, TT_AttributeRParen);
1887+
1888+
// Generic macro has no special handling in this location.
1889+
Tokens = annotate("@property(weak) id delegate A(X);");
1890+
ASSERT_EQ(Tokens.size(), 13u) << Tokens;
1891+
// Note: Don't check token-type as a random token in this position is hard to
1892+
// reason about.
1893+
EXPECT_TOKEN_KIND(Tokens[7], tok::identifier);
1894+
EXPECT_TOKEN_KIND(Tokens[8], tok::l_paren);
1895+
1896+
// Add a custom AttributeMacro. Test that it has the same behavior.
1897+
FormatStyle Style = getLLVMStyle();
1898+
Style.AttributeMacros.push_back("A");
1899+
1900+
// An "AttributeMacro" gets annotated like '__attribute__'.
1901+
Tokens = annotate("@property(weak) id delegate A(X);", Style);
1902+
ASSERT_EQ(Tokens.size(), 13u) << Tokens;
1903+
EXPECT_TOKEN(Tokens[7], tok::identifier, TT_AttributeMacro);
1904+
EXPECT_TOKEN(Tokens[8], tok::l_paren, TT_AttributeLParen);
1905+
EXPECT_TOKEN(Tokens[10], tok::r_paren, TT_AttributeRParen);
1906+
}
1907+
17981908
TEST_F(TokenAnnotatorTest, UnderstandsVerilogOperators) {
17991909
auto Annotate = [this](llvm::StringRef Code) {
18001910
return annotate(Code, getLLVMStyle(FormatStyle::LK_Verilog));

0 commit comments

Comments
 (0)