http://llvm.org/bugs/show_bug.cgi?id=9992

           Summary: clang -cc1 -fdelayed-template-parsing -emit-pch does
                    not save template contents in PCH
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


$ echo 'template<typename T> void f() { i can put anything here }' | clang++
-cc1 -x c++ -fdelayed-template-parsing -emit-pch -o tmp.pch
$ echo 'template<typename T> void g() { f<T>(); } int n = (g<int>(), 0);' |
./clang++ -cc1 -x c++ -fdelayed-template-parsing -include-pch tmp.pch
-emit-llvm -o - | grep _Z1fIiEvv
  call void @_Z1fIiEvv()
declare void @_Z1fIiEvv()

Oops. It looks like the tokens for 'f' are neither parsed nor saved in the PCH
file, resulting in us silently losing 'f's definition.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to