[llvm-bugs] [Bug 27307] New: clang-cl rejects -fno-delayed-template-parsing

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Apr 9 12:49:41 PDT 2016


            Bug ID: 27307
           Summary: clang-cl rejects -fno-delayed-template-parsing
           Product: clang
           Version: 3.7
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: sfinae at hotmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

I'm seeing this with Clang/C2 3.7, but I strongly suspect that Clang/LLVM trunk
is equally affected.

This is similar to https://llvm.org/bugs/show_bug.cgi?id=25114 "clang-cl
rejects -fno-ms-compatibility". I want to request maximum strictness from
clang-cl, enabling only actual features like __declspec(dllimport), in order to
keep MSVC's STL headers clean. I recently learned that two-phase lookup is
controlled by a separate option, but clang-cl doesn't understand it:

C:\Temp>type meow.cpp
#include <stdio.h>

void f(int) {
    puts("Standard two-phase!");

template <typename T> void g(T t) {

void f(double) {
    puts("Microsoft one-phase!");

int main() {

C:\Temp>clang-cl /EHsc /nologo /W4 -fno-ms-compatibility meow.cpp && meow
Microsoft one-phase!

C:\Temp>clang-cl /EHsc /nologo /W4 -fno-ms-compatibility
-fno-delayed-template-parsing meow.cpp && meow
clang-cl.exe: warning: ignoring unrecognized command-line option
clang-cl.exe: warning: argument unused during compilation:
Microsoft one-phase!

C:\Temp>clang-cl /EHsc /nologo /W4 -fno-ms-compatibility -Xclang
-fno-delayed-template-parsing meow.cpp && meow
error: unknown argument: '-fno-delayed-template-parsing'

As two-phase lookup doesn't affect the ABI, I should be able to request
strictness here.

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/20160409/0f4b8957/attachment.html>

More information about the llvm-bugs mailing list