mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 09:06:07 +00:00

Value, type, and instantiation dependence were not being handled correctly for CUDAKernelCallExpr AST nodes. As a result, if an undeclared identifier was used in the triple-angle-bracket kernel call configuration, there would be no error during parsing, and there would be a crash during code gen. This patch makes sure that an error will be issued during parsing in this case, just as there would be for any other use of an undeclared identifier in C++. Patch by Jason Henline. Reviewers: jlebar, rsmith Differential Revision: http://reviews.llvm.org/D15858 llvm-svn: 257839
11 lines
370 B
Plaintext
11 lines
370 B
Plaintext
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
|
|
|
|
#include "Inputs/cuda.h"
|
|
|
|
__global__ void k1() {}
|
|
|
|
template<int ...Dimensions> void k1Wrapper() {
|
|
void (*f)() = [] { k1<<<Dimensions, Dimensions>>>(); }; // expected-error {{initializer contains unexpanded parameter pack 'Dimensions'}}
|
|
void (*g[])() = { [] { k1<<<Dimensions, Dimensions>>>(); } ... }; // ok
|
|
}
|