[llvm-bugs] [Bug 49069] New: Clang accepts invalid code when an auto arg

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 5 17:02:54 PST 2021


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

            Bug ID: 49069
           Summary: Clang accepts invalid code when an auto arg
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: Darrell.Wright at gmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

clang trunk accepts the following code.

template<>
int func( int a, auto b ) { return a + b; }

int main( ) {
    return func( 1, true );
}


It's not a specialization, and allows an empty template parameter list.

-- 
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/20210206/2901151d/attachment.html>


More information about the llvm-bugs mailing list