[PATCH] D100860: [C++4OpenCL] Add missing OpenCL specific diagnostics in templates
Ole Strohm via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 20 08:28:14 PDT 2021
olestrohm created this revision.
olestrohm added reviewers: Anastasia, svenvh.
Herald added subscribers: ldrumm, wenlei, yaxunl.
olestrohm requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
For templates diagnosis must be done after specialization instead of during parsing.
I've left the check during parsing as well, because it provides slightly better error messages, though some are lost now that NewVD is set as invalid, instead of just setting D invalid.
This fixes: https://bugs.llvm.org/show_bug.cgi?id=48887
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D100860
Files:
clang/lib/Sema/SemaDecl.cpp
clang/test/SemaOpenCL/event_t.cl
clang/test/SemaOpenCL/sampler_t.cl
clang/test/SemaOpenCLCXX/template-diagnostics.clcpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100860.338876.patch
Type: text/x-patch
Size: 9924 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210420/6ce0504e/attachment-0001.bin>
More information about the cfe-commits
mailing list