[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

Michael Liao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 20 10:02:06 PST 2020


hliao marked 2 inline comments as done.
hliao added inline comments.


================
Comment at: clang/include/clang/Sema/Sema.h:11442
+      ContextDecl = getCUDACurrentNonLocalVariable();
+    return ContextDecl;
+  }
----------------
rjmccall wrote:
> This is tricky because we could be in a nested context, not just the initializer, and that context just might not be a function.   For example, there could be a local class in a lambda or something like that.
You are right. Limit that to function and TU context so far. I need more efforts to consider other cases. One case in mind is that default member initialier in a class. But, for local classes in a lambda, they should be in a function (lambda function body) context.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71227





More information about the cfe-commits mailing list