================
@@ -2257,6 +2257,13 @@ TEST_F(TokenAnnotatorTest,
UnderstandsFunctionDeclarationNames) {
EXPECT_TOKEN(Tokens[1], tok::identifier, TT_FunctionDeclarationName);
EXPECT_TOKEN(Tokens[2], tok::l_paren, TT_FunctionDeclarationLParen);
+ Tokens = annotate("#define FUNC(foo, bar) \\\n"
+ " auto foo##bar() -> Type {}");
+ ASSERT_EQ(Tokens.size(), 19u) << Tokens;
+ EXPECT_TOKEN(Tokens[9], tok::identifier, TT_FunctionDeclarationName);
+ EXPECT_TOKEN(Tokens[12], tok::l_paren, TT_FunctionDeclarationLParen);
+ EXPECT_TOKEN(Tokens[14], tok::arrow, TT_TrailingReturnArrow);
+
----------------
owenca wrote:
Not really as the last try was reverted and we are doing it afresh here. It
would be silly to add:
```
EXPECT_TOKEN(Tokens[11], tok::identifier, TT_Unknown); // Not
TT_FunctionDeclarationName
```
because this was the case before that reverted patch and before this patch
(after that patch was reverted).
https://github.com/llvm/llvm-project/pull/142337
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits