diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2019-10-17 20:00:38 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2019-10-17 20:00:38 +0000 |
commit | ac4c7868f1032bb9184cd9a59ee17845f6f456c6 (patch) | |
tree | 087cdb040fedacacd6a432cb39fa755b1100c9e9 /gcc/cp/lambda.c | |
parent | 8228c8f2a54be12c70070d4eb2cd64483782b138 (diff) | |
download | gcc-ac4c7868f1032bb9184cd9a59ee17845f6f456c6.zip gcc-ac4c7868f1032bb9184cd9a59ee17845f6f456c6.tar.gz gcc-ac4c7868f1032bb9184cd9a59ee17845f6f456c6.tar.bz2 |
decl.c (grokfndecl): Remove redundant use of in_system_header_at.
/cp
2019-10-17 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (grokfndecl): Remove redundant use of in_system_header_at.
(compute_array_index_type_loc): Likewise.
(grokdeclarator): Likewise.
* error.c (cp_printer): Likewise.
* lambda.c (add_default_capture): Likewise.
* parser.c (cp_parser_primary_expression): Likewise.
(cp_parser_selection_statement): Likewise.
(cp_parser_toplevel_declaration): Likewise.
(cp_parser_enumerator_list): Likewise.
(cp_parser_using_declaration): Likewise.
(cp_parser_member_declaration): Likewise.
(cp_parser_exception_specification_opt): Likewise.
(cp_parser_std_attribute_spec): Likewise.
* pt.c (do_decl_instantiation): Likewise.
(do_type_instantiation): Likewise.
* typeck.c (cp_build_unary_op): Likewise.
* decl.c (check_tag_decl): Pass to in_system_header_at the same
location used for the permerror.
(grokdeclarator): Likewise.
* decl.c (check_tag_decl): Use locations[ds_typedef] in error_at.
/testsuite
2019-10-17 Paolo Carlini <paolo.carlini@oracle.com>
* g++.old-deja/g++.other/decl9.C: Check locations too.
From-SVN: r277133
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r-- | gcc/cp/lambda.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c index b503e97..f128ed8 100644 --- a/gcc/cp/lambda.c +++ b/gcc/cp/lambda.c @@ -697,8 +697,7 @@ add_default_capture (tree lambda_stack, tree id, tree initializer) /* Warn about deprecated implicit capture of this via [=]. */ if (cxx_dialect >= cxx2a && this_capture_p - && LAMBDA_EXPR_DEFAULT_CAPTURE_MODE (lambda) == CPLD_COPY - && !in_system_header_at (LAMBDA_EXPR_LOCATION (lambda))) + && LAMBDA_EXPR_DEFAULT_CAPTURE_MODE (lambda) == CPLD_COPY) { if (warning_at (LAMBDA_EXPR_LOCATION (lambda), OPT_Wdeprecated, "implicit capture of %qE via %<[=]%> is deprecated " |