[llvm-bugs] [Bug 50494] New: Type Traits with an empty parameter pack crashes. Also skip arity checks

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 26 10:59:24 PDT 2021


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

            Bug ID: 50494
           Summary: Type Traits with an empty parameter pack crashes.
                    Also skip arity checks
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: erich.keane at intel.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

See this for example:
https://godbolt.org/z/G8onvPEqM

template<typename ...Ts>
bool foo() {
 return __is_pointer(Ts...);
}

void instant() {
    foo<int>(); // #1
    foo<int, int*>(); // #2
    foo<>(); // #3
}

#1 works correctly.

#2 should probably emit a diagnostic, since now there are two parameters to a
Unary type trait.

#3 should probably ALSO emit a diagnostic, since there are NO parameters to a
unary type trait.

-- 
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/20210526/1fff9207/attachment.html>


More information about the llvm-bugs mailing list