[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 12 02:41:45 PST 2018


Anastasia accepted this revision.
Anastasia added a comment.

LGTM! Apart from small improvement that can done before committing if it works at all. :)



================
Comment at: lib/Sema/SemaType.cpp:5169
+TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D, Scope *S,
+                                           const DeclContext *DC) {
   // Determine the type of the declarator. Not all forms of declarator
----------------
mikael wrote:
> Anastasia wrote:
> > Rather than passing `DeclContext` you can get it from the `Declarator` using `getContext()` method.
> Declarator::getContext() returns an enumeration DeclaratorContext which is not enough in this case.
Ok, I was wondering if you can use scope `clang::NestedNameSpecifier::SpecifierKind` to check if something is a method instead of passing `DC` down.


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

https://reviews.llvm.org/D54862





More information about the cfe-commits mailing list