[llvm-bugs] [Bug 30477] New: missing attribute warnings on non-type-template-params

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 21 11:11:08 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=30477

            Bug ID: 30477
           Summary: missing attribute warnings on non-type-template-params
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nlewycky at google.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Example:

  template <int __attribute__((interrupt)) I> void f();

While debugging something else I noticed that we never enter
ProcessDeclAttribute on this TU, and we fail to issue the warning that
interrupt only applies to functions. Here's another example:

  template <int __attribute__((tls_model)) I> void f();
  int __attribute__((tls_model)) i;

x.cc:2:20: error: 'tls_model' attribute takes one argument
int __attribute__((tls_model)) i;
                   ^
1 error generated.

The template<> line should generate the same warning.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160921/52504f9e/attachment.html>


More information about the llvm-bugs mailing list