Message ID | 1510973563-10046-4-git-send-email-dmalcolm@redhat.com |
---|---|
State | New |
Headers | show |
Series | C++: locations for (almost) everything (PR 43486) | expand |
diff --git a/gcc/tree.h b/gcc/tree.h index 9a0bd60..98acc8b 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -492,6 +492,14 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, (EXP) = TREE_OPERAND ((EXP), 0); \ } while (0) +/* As STRIP_ANY_LOCATION_WRAPPER, but handle NULL_TREE. */ + +#define STRIP_ANY_LOCATION_WRAPPER_SAFE(EXP) \ + do { \ + if ((EXP) && location_wrapper_p (EXP)) \ + (EXP) = TREE_OPERAND ((EXP), 0); \ + } while (0) + /* Nonzero if TYPE represents a vector type. */ #define VECTOR_TYPE_P(TYPE) (TREE_CODE (TYPE) == VECTOR_TYPE)