[llvm-bugs] [Bug 38296] New: A potential problem to compile Chromium

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 24 17:26:02 PDT 2018


            Bug ID: 38296
           Summary: A potential problem to compile Chromium
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zhonghao at pku.org.cn
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

A user complained that a previous gcc cannot compile Chromium. The bug report


The reduced code is as follow:

class A {
 template <typename> void As();
 static A *FromWebContents();
 template <typename... Ts>
 A *FromWebContents(Ts...);
template <typename T> class B : A {
 void FromWebContents() {
 auto guest = A::FromWebContents();

After fixing the bug, the latest g++ accepts the code. I tried clang++, and it
rejects the code:

code3.cpp:11:9: error: use 'template' keyword to treat 'As' as a dependent
template name
    1 error generated.

Potentially, clang++ may fail to compile Chromium?

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180725/9612aa30/attachment.html>

More information about the llvm-bugs mailing list