patricklyster added a comment. In https://reviews.llvm.org/D51378#1219474, @RaviNarayanaswamy wrote:
> I did not see the code where check is done if Nestingdepth is 0 at end of > compilation. Sorry I should clarify. You will get an error if you have an unmatched `#pragma omp declare target` once you reach the end of the compilation unit (not the header file) because execution will exit the while loop in ParseOpenMP.cpp:774 when it encounters a `tok::eof` and fall into the `else` statement on ParseOpenMP.cpp:812 which emits the diagnostic. So it is not explicitly checking if DeclareTargetNestingLevel > 0 but you will see an appropriate diagnostic anyways. 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