mizvekov added inline comments.
================
Comment at: clang/test/Parser/while-loop-outside-function.c:4
+// basic
+while(1) {}; // expected-error {{while loop outside of a function}}
+
----------------
What I meant is something like this, we test that the error caret would be
placed on the while keyword.
You have to break it down like this as you can't express in the verifier where
an error would occur inside a line.
================
Comment at: clang/test/Parser/while-loop-outside-function.c:22
+// recovery
+void some_fn();
+
----------------
To demonstrate recovery, I think it would make sense to try to use this
declaration later, and test that it would work.
Ie you can try to 'overload' on the return type and see that you get the
expected error.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129573/new/
https://reviews.llvm.org/D129573
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits