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

            Bug ID: 22076
           Summary: template attribute is not diagnosed in the first
                    instantiation
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Compile this code with clang r224899:


template <typename T>class c { T d; } __attribute__ ((__deprecated__));
int main() {
  c<int> a;
  c<int> b;
}


the __deprecated__ attribute is diagnosed for b but not for the first time it's
used in a. If b is removed there is no warning at all.

Debugging finds that DiagnoseAvailabilityOfDecl() in SemaExpr.cpp gets a
ClassTemplateSpecializationDecl declaration for a without any attributes but
ClassTemplateSpecializationDecl definition for b with deprecated attribute.

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