summaryrefslogtreecommitdiff
path: root/scripts/kconfig/parser.y
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-02-03 00:58:12 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2024-02-19 18:20:40 +0900
commitd3e4a68fe20f3c05de77f5e300e3d76a9f68d942 (patch)
tree14a47f85673b753e3ec3f40c248c740780d62f19 /scripts/kconfig/parser.y
parentfe273c6fc318da07bdbb42d26d8e6e150aa947af (diff)
kconfig: do not delay the cur_filename update
Currently, cur_filename is updated at the first token of each statement. However, this seems unnecessary based on my understanding; the parser can use the same variable as the lexer tracks. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/parser.y')
-rw-r--r--scripts/kconfig/parser.y8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/kconfig/parser.y b/scripts/kconfig/parser.y
index d1d05c8cd89d..e58c24d2e5ab 100644
--- a/scripts/kconfig/parser.y
+++ b/scripts/kconfig/parser.y
@@ -488,6 +488,14 @@ void conf_parse(const char *name)
yydebug = 1;
yyparse();
+ /*
+ * FIXME:
+ * cur_filename and cur_lineno are used even after yyparse();
+ * menu_finalize() calls menu_add_symbol(). This should be fixed.
+ */
+ cur_filename = "<none>";
+ cur_lineno = 0;
+
str_printf(&autoconf_cmd,
"\n"
"$(autoconfig): $(deps_config)\n"