[PATCH] Bug Fix: Disallow a variable template to be redeclared as a non-templated variable

Larisse Voufo lvoufo at google.com
Tue Aug 13 14:19:36 PDT 2013


lvoufo added you to the CC list for the revision "Bug Fix: Disallow a variable template to be redeclared as a non-templated variable".

Hi rsmith,

Rejects the following program.

  template<typename T> T var = T(); 
  extern int var;

Incidentally, PCH serialization is also improved...

http://llvm-reviews.chandlerc.com/D1389

Files:
  include/clang/Sema/Sema.h
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaTemplateInstantiateDecl.cpp
  lib/Serialization/ASTReaderDecl.cpp
  lib/Serialization/ASTWriterDecl.cpp
  test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp
  test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp
  test/PCH/cxx1y-variable-templates.cpp
  test/SemaCXX/cxx1y-variable-templates_top_level.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1389.1.patch
Type: text/x-patch
Size: 11479 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130813/fd143695/attachment.bin>


More information about the cfe-commits mailing list