Izaron added a comment. A big TODO: rename `ext_c_label_end_of_compound_statement` to something like `ext_c_label_free_positioning`. Since we found out it is more complete than just the end of statements.
================ Comment at: clang/lib/Parse/ParseStmt.cpp:695-697 - // The substatement is always a 'statement', not a 'declaration', but is - // otherwise in the same context as the labeled-statement. - StmtCtx &= ~ParsedStmtContext::AllowDeclarationsInC; ---------------- Place in code where it matters: https://github.com/llvm/llvm-project/blob/84870c4abbacfb97ca025c9219b724f381611380/clang/lib/Parse/ParseStmt.cpp#L237 ================ Comment at: clang/test/OpenMP/threadprivate_messages.cpp:141 label: -#pragma omp threadprivate(d4) // expected-error {{'#pragma omp threadprivate' cannot be an immediate substatement}} +#pragma omp threadprivate(d4) ---------------- TODO: find out if this is okay? (I've got no idea what it does) ================ Comment at: clang/test/Parser/c2x-label.c:5-6 void test_label_in_func() { - int x; label1: + int x; +label2: ---------------- TODO: make sure a warning is printed. I couldn't find correct conditions for the warning, I tried and it produced false positive warnings in some other tests =( P.S. Its C++'s counterpart: https://github.com/llvm/llvm-project/blob/main/clang/test/Parser/cxx2b-label.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146393/new/ https://reviews.llvm.org/D146393 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits