[PATCH] Fix PR20495: correct inference of the CUDA target for implicit members

Eli Bendersky eliben at google.com
Tue Sep 9 08:39:39 PDT 2014


Addresses Richard's comments.

I made the mismatch detection more robust - now instead of returning "host", when inference fails due to a conflict it returns an "invalid" target, which then causes all lookups to fail. This also provides a more natural place to rerun inference with Diagnose=true, when we try to diagnose why overload resolution failed.

I added more tests, but for now can't test copy/move assignment operators due to http://llvm.org/bugs/show_bug.cgi?id=20886

http://reviews.llvm.org/D5199

Files:
  include/clang/Basic/Attr.td
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Sema/Sema.h
  lib/Sema/SemaCUDA.cpp
  lib/Sema/SemaDeclCXX.cpp
  lib/Sema/SemaOverload.cpp
  test/SemaCUDA/implicit-member-target-collision-cxx11.cu
  test/SemaCUDA/implicit-member-target-collision.cu
  test/SemaCUDA/implicit-member-target.cu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5199.13473.patch
Type: text/x-patch
Size: 30936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140909/e8503ce1/attachment.bin>


More information about the cfe-commits mailing list