[PATCH] D70172: [CUDA][HIP][OpenMP] Emit deferred diagnostics by a post-parsing AST travese

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 26 10:34:42 PST 2020


yaxunl added a comment.

I tried recording functions to be emitted during normal parsing and using it as starting point for the final traversal. It is quite promising. I only get one lit test failure for OpenMP:

  int foobar2();
  
  #pragma omp declare target
  int (*B)() = &foobar2;
  #pragma omp end declare target
  
  int foobar2() { throw 1; } // expected-error {{cannot use 'throw' with exceptions disabled}}

In this case, the emission state of foobar2 cannot be determined by itself. It can only be determined to be emitted through variable B. Therefore, I also need to record variables that are potentially emitted.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70172/new/

https://reviews.llvm.org/D70172





More information about the cfe-commits mailing list