aboutsummaryrefslogtreecommitdiff
path: root/ylwrap
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-09-25 06:53:06 -0700
committerNathan Sidwell <nathan@acm.org>2020-09-25 06:58:07 -0700
commita28542df4d069d9937070b5456a54d5e10bcfe56 (patch)
treebe1f8948f5340c1e7d84ff3408b1951e66a11fb6 /ylwrap
parent69cf7decf1be230739b1e309115832373025b41d (diff)
downloadgcc-a28542df4d069d9937070b5456a54d5e10bcfe56.zip
gcc-a28542df4d069d9937070b5456a54d5e10bcfe56.tar.gz
gcc-a28542df4d069d9937070b5456a54d5e10bcfe56.tar.bz2
c++: DECL_BUILTIN_P for builtins
We currently detect builtin decls via DECL_ARTIFICIAL && !DECL_HIDDEN_FUNCTION_P, which, besides being clunky, is a problem as hiddenness is a property of the symbol table -- not the decl being hidden. This adds DECL_BUILTIN_P, which just looks at the SOURCE_LOCATION -- we have a magic one for builtins. One of the consequential changes is to make function-scope omp udrs have function context (needed because otherwise duplicate-decls thinks the types don't match at the point we check). This is also morally better, because that's what they are -- nested functions, stop lying. (That's actually my plan for all DECL_LOCAL_DECL_P decls, as they are distinct decls to the namespace-scope decl they alias.) gcc/cp/ * cp-tree.h (DECL_BUILTIN_P): New. * decl.c (duplicate_decls): Use it. Do not treat omp-udr as a builtin. * name-lookup.c (anticipated_builtin): Use it. (set_decl_context_in_fn): Function-scope OMP UDRs have function context. (do_nonmember_using_decl): Use DECL_BUILTIN_P. * parser.c (cp_parser_omp_declare_reduction): Function-scope OMP UDRs have function context. Assert we never find a valid duplicate. * pt.c (tsubst_expr): Function-scope OMP UDRs have function context. libcc1/ * libcp1plugin.cc (supplement_binding): Use DECL_BULTIN_P.
Diffstat (limited to 'ylwrap')
0 files changed, 0 insertions, 0 deletions