[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 5 03:27:30 PST 2024
================
@@ -620,6 +620,23 @@ TEST_F(TokenAnnotatorTest, UnderstandsCasts) {
ASSERT_EQ(Tokens.size(), 8u) << Tokens;
EXPECT_TOKEN(Tokens[3], tok::r_paren, TT_Unknown);
EXPECT_TOKEN(Tokens[4], tok::amp, TT_BinaryOperator);
+
+ Tokens = annotate("#define FOO(bar) foo((uint64_t)&bar)");
+ ASSERT_EQ(Tokens.size(), 15u) << Tokens;
+ EXPECT_TOKEN(Tokens[10], tok::r_paren, TT_CastRParen);
+ EXPECT_TOKEN(Tokens[11], tok::amp, TT_UnaryOperator);
+
+ Tokens = annotate("#define FOO(bar) foo((time_t) & bar)");
----------------
mydeveloperday wrote:
you didn't have time_t in the list did you? does that mean we are just checking this one uint64_t type above
https://github.com/llvm/llvm-project/pull/83709
More information about the cfe-commits
mailing list