From 25b68ab5a7beb3b49e41588f0451f1099e3e38e4 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Mon, 3 Dec 2012 17:54:19 +0100 Subject: Record locations for symbols defined with 'menuconfig'. We previously only looked for T_CONFIG to determine if a location should be recorded. We need to look for T_MENUCONFIG as well. Also add some sanity checks for get_ref/def_location() to the test suite. --- kconfiglib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kconfiglib.py') diff --git a/kconfiglib.py b/kconfiglib.py index ee81c50..3d81265 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -1054,7 +1054,7 @@ class Config(): # time we see it. sym = self._sym_lookup(name, not for_eval) - if previous == T_CONFIG: + if previous in (T_CONFIG, T_MENUCONFIG): # If the previous token is T_CONFIG ("config"), we're # tokenizing the first line of a symbol definition, and # should remember this as a location where the symbol -- cgit v1.2.3