[llvm-bugs] [Bug 46483] New: Adopt variadic isa<> within LLVM code

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 27 18:34:53 PDT 2020


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

            Bug ID: 46483
           Summary: Adopt variadic isa<> within LLVM code
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Core LLVM classes
          Assignee: unassignedbugs at nondot.org
          Reporter: jurahul at google.com
                CC: llvm-bugs at lists.llvm.org

llvm::isa<> is now a variadic template, so code such as:

isa<Type0>(x) || isa<Type1>(x) ...

can be replaced by 

isa<Type0, Type1, ...>(x).

Similarly, code such as:

!isa<Type0>(x) && !isa<Type1>(x) ...

can be replaced by

!isa<Type0, Type1, ...>

This bugs is to consider adopting this within the LLVM code base. I see
numerous places where this pattern is uses and can be simplified using a
variadic isa<>.

-- 
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/20200628/20436b0e/attachment-0001.html>


More information about the llvm-bugs mailing list