[LLVMbugs] [Bug 12291] New: Invalid template declaration is accepted

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Mar 17 03:28:34 PDT 2012


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

             Bug #: 12291
           Summary: Invalid template declaration is accepted
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: abramobagnara at tin.it
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


As the typescript below shows, the template class declaration is accepted
without any diagnostic and not put in AST.

$ cat p2.cc
template <typename T>
class Outer2 {
  template <typename V>
  template <typename W>
  class Outer2<V>::Inner;
};
$ ~/llvm_trunk/Debug+Asserts/bin/clang -cc1 -ast-dump p2.cc
typedef __int128_t __int128_t;
typedef __uint128_t __uint128_t;
struct __va_list_tag {
    struct __va_list_tag;
    unsigned int gp_offset;
    unsigned int fp_offset;
    void *overflow_arg_area;
    void *reg_save_area;
};
typedef struct __va_list_tag __va_list_tag;
typedef __va_list_tag __builtin_va_list[1];
template <typename T> class Outer2 {
    class Outer2;
};

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