[clang] [C] Disallow declarations where a statement is required (PR #92908)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Tue May 21 12:26:37 PDT 2024
================
@@ -467,15 +467,18 @@ class Parser : public CodeCompletionHandler {
/// Flags describing a context in which we're parsing a statement.
enum class ParsedStmtContext {
+ /// This context permits declarations in language modes where declarations
+ /// are not statements.
+ AllowDeclarationsInC = 0x1,
----------------
shafik wrote:
This feels a little mysterious, I only see that we check it but it is not obvious how it gets set.
https://github.com/llvm/llvm-project/pull/92908
More information about the cfe-commits
mailing list