[PATCH] D65744: [PR42707][OpenCL] Fix addr space deduction for auto

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 4 04:05:14 PDT 2019


Anastasia marked an inline comment as done.
Anastasia added inline comments.


================
Comment at: include/clang/AST/Type.h:6509
+  return isa<AutoType>(CanonicalType);
+}
+
----------------
rjmccall wrote:
> Hmm.  So this method, confusingly, will not return true for a deduced `auto`, unless the deduced type is itself an undeduced `auto` (which I'm not sure can happen).  I think it at least needs a different name; `isUndeducedAutoType()` would be okay if the latter case is not possible.  But it might be better if we can just define away the need for the method entirely.
I feel I still need this helper in order to detect the auto type. Alternatively I can create a static function for this instead of publicly exposing this functionality. Or maybe you have other ideas in mind...


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

https://reviews.llvm.org/D65744





More information about the cfe-commits mailing list