LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 7660 - Assertion failure in PCHWriterDecl.cpp:557: void clang::PCHDeclWriter::VisitParmVarDecl(clang::ParmVarDecl*): Assertion `!D->isStaticDataMember() && "PARM_VAR_DECL can't be static data member"' failed.
Summary: Assertion failure in PCHWriterDecl.cpp:557: void clang::PCHDeclWriter::VisitP...
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: C++ (show other bugs)
Version: trunk
Hardware: PC Linux
: P normal
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-16 17:07 PDT by Eelis
Modified: 2010-07-19 05:17 PDT (History)
7 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eelis 2010-07-16 17:07:53 PDT
Consider:

  template<typename T> struct S { void g(void (*)(T)); };
  template<> void S<int>::g(void(*)(int)) {}

When compiled into a PCH with:

  clang -cc1 t.hpp -emit-pch -o t.hpp.pch

I get:

  clang: PCHWriterDecl.cpp:557: void clang::PCHDeclWriter::VisitParmVarDecl(clang::ParmVarDecl*): Assertion `!D->isStaticDataMember() && "PARM_VAR_DECL can't be static data member"' failed.

I'm using clang trunk 108560.
Comment 1 Eli Friedman 2010-07-16 20:23:06 PDT
I think the cause here is r108266.
Comment 2 Argyrios Kyrtzidis 2010-07-19 05:17:36 PDT
Fixed at r108692.