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

            Bug ID: 45165
           Summary: -Wdocumentation has false positives in template
                    members of variadic template classes
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

Running the following code with -fsyntax-only -Wdocumentation:

template<typename... Args>
struct X {
    /// @param args  Arguments.
    template<typename T>
    static int f(T t, Args... args) { return 1; }
};

void call() {
    X<>::f(1);
}

produces the warning

<source>:3:16: warning: parameter 'args' not found in the function declaration
[-Wdocumentation]
    /// @param args  Arguments.
               ^~~~
<source>:3:16: note: did you mean 't'?
    /// @param args  Arguments.
               ^~~~
               t

That's likely because the template parameter pack is empty, so in X<> the
method doesn't take any "args".

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to