[PATCH] D84364: [CUDA][HIP] Defer overloading resolution diagnostics for host device functions

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 6 13:41:51 PDT 2023


shafik added inline comments.
Herald added subscribers: jplehr, mattd, carlosgalvezp, MaskRay.
Herald added a project: All.


================
Comment at: clang/lib/Sema/SemaDecl.cpp:14543
     // deletion in some later function.
-    if (getDiagnostics().hasUncompilableErrorOccurred() ||
+    if (hasUncompilableErrorOccurred() ||
         getDiagnostics().getSuppressAllDiagnostics()) {
----------------
Do you have tests that cover this case? 

This section of code came up while I was investigating this bug report: https://github.com/llvm/llvm-project/issues/48974

I tried replacing `hasUncompilableErrorOccurred()` with `hasAnyUnrecoverableErrorsInThisFunction()` and it fixes the reported bug and it does not cause any tests to fail with `check-clang` but it looks like `hasUncompilableErrorOccurred()` is doing a lot more checks and so I expected some tests to fail when I swapped it out. 

If we are missing test coverage we should add some. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84364



More information about the cfe-commits mailing list