HazardyKnusperkeks added a comment. In D127873#3586475 <https://reviews.llvm.org/D127873#3586475>, @MyDeveloperDay wrote:
> what about (may not be useful but compiles) > > struct { > int foo; > } &&ptr2 = {}; > > https://godbolt.org/z/rbb8x3hKP Let's ask why it was set to a binary operator. What kind of code would want the binary operator after a closing brace? I can make up such code, but we basically have to decide which code is probably more in use, or make the detection more sophisticated. ================ Comment at: clang/unittests/Format/TokenAnnotatorTest.cpp:93 + EXPECT_EQ(Tokens.size(), 10u) << Tokens; + EXPECT_TOKEN(Tokens[6], tok::star, TT_PointerOrReference); } ---------------- MyDeveloperDay wrote: > Can you add a verifyFormat test that shows what you want? as well I think the annotator test is sufficient. Because it's just about annotating the token, formatting is secondary (and dependent on style - these tests are already in place). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127873/new/ https://reviews.llvm.org/D127873 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits