HomePhabricator

[OpenMP] Handle non-function context before checking for diagnostic

Authored by pmrao on Mar 5 2021, 12:05 PM.

Description

[OpenMP] Handle non-function context before checking for diagnostic
emission

Ensure that we are in a function declaration context before checking
the diagnostic emission status, to avoid dereferencing a NULL function
declaration.

Differential Revision: https://reviews.llvm.org/D97573