Hahnfeld added a comment. In https://reviews.llvm.org/D51378#1218184, @RaviNarayanaswamy wrote:
> We should just go with generating an error if the DeclareTargetNestingLevel > is not 0 at the end of compilation unit. > Hard to detect if user accidentally forgot to have end declare in header > file and had it in the include file or it was intentional. That will effectively forbid the legacy approach of doing #pragma omp declare target #include <...> #pragma omp end declare target as in the test because `DeclareTargetNestingLevel` will be 1 throughout the header file. I think that's still relevant today, so the condition should be "has the same value as when entering this file". Repository: rC Clang https://reviews.llvm.org/D51378 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits