aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-exp.y
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r--gdb/c-exp.y13
1 files changed, 5 insertions, 8 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 8290580..d321e81 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -51,6 +51,7 @@
#include "type-stack.h"
#include "target-float.h"
#include "c-exp.h"
+#include "macroexp.h"
#define parse_type(ps) builtin_type (ps->gdbarch ())
@@ -1883,7 +1884,7 @@ name_not_typename : NAME
the parser can't tell whether NAME_OR_INT is a name_not_typename (=variable,
=exp) or just an exp. If name_not_typename was ever used in an lvalue
context where only a name could occur, this might be useful.
- | NAME_OR_INT
+ | NAME_OR_INT
*/
| oper
{
@@ -3071,10 +3072,7 @@ lex_one_token (struct parser_state *par_state, bool *is_quoted_name)
if (lookup_symbol (copy.c_str (),
pstate->expression_context_block,
- SEARCH_VFT,
- (par_state->language ()->la_language
- == language_cplus ? &is_a_field_of_this
- : NULL)).symbol
+ SEARCH_VFT, &is_a_field_of_this).symbol
!= NULL)
{
/* The keyword is shadowed. */
@@ -3136,8 +3134,7 @@ classify_name (struct parser_state *par_state, const struct block *block,
std::string copy = copy_name (yylval.sval);
bsym = lookup_symbol (copy.c_str (), block, SEARCH_VFT,
- par_state->language ()->name_of_this ()
- ? &is_a_field_of_this : NULL);
+ &is_a_field_of_this);
if (bsym.symbol && bsym.symbol->loc_class () == LOC_BLOCK)
{
@@ -3172,7 +3169,7 @@ classify_name (struct parser_state *par_state, const struct block *block,
filename. However, if the name was quoted, then it is better
to check for a filename or a block, since this is the only
way the user has of requiring the extension to be used. */
- if ((is_a_field_of_this.type == NULL && !is_after_structop)
+ if ((is_a_field_of_this.type == NULL && !is_after_structop)
|| is_quoted_name)
{
/* See if it's a file name. */