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

Mikael Nilsson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 11 02:59:54 PST 2018


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


================
Comment at: test/SemaOpenCLCXX/address-space-templates.cl:7
   T f1();     // expected-error{{function type may not be qualified with an address space}}
-  void f2(T); // expected-error{{parameter may not be qualified with an address space}}
+  // FIXME: Should only get the error message once.
+  void f2(T); // expected-error{{parameter may not be qualified with an address space}} expected-error{{parameter may not be qualified with an address space}}
----------------
Anastasia wrote:
> mikael wrote:
> > This was the remaining issue that I have not solved yet. It looked like this issue was not so trivial so I think it makes sense to postpone it.
> Do you know why it appears twice?
I believe the main issue is that  we have some code that does the following in SemaTemplateInstantiateDecl.cpp:

```
OldTL.getAs<FunctionProtoTypeLoc>()
```

But the implementation of getAs returns nullptr if you have local modifiers. So since this code will always return nullptr we end up taking a different paths.


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

https://reviews.llvm.org/D54862





More information about the cfe-commits mailing list