https://bugs.llvm.org/show_bug.cgi?id=48887

            Bug ID: 48887
           Summary: [C++4OpenCL] Missing OpenCL specific diagnostics in
                    templates
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: OpenCL
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

Clang fails to diagnose invalid cases inside the templates that appear after
template parameter substitution:

template<typename T>
void templ() {
  T loc; 
}

void foo(){
    templ<image1d_t>();
    templ<__local event_t>();
    templ<__local sampler_t>();

    templ<half>();
    image1d_t img;
    __local event_t e;
    __local sampler_t s;
    half h;
}
'
The diagnostic will appear correctly for 'foo' but no 'templ'. Even if after
the substitution they have identical invalid cases.

See: https://godbolt.org/z/jn8WT3

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to