[LLVMbugs] [Bug 9992] New: clang -cc1 -fdelayed-template-parsing -emit-pch does not save template contents in PCH

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon May 23 11:41:21 PDT 2011


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: unassignedclangbugs at nondot.org
        ReportedBy: richard-llvm at metafoo.co.uk
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


$ 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.



More information about the llvm-bugs mailing list