[llvm-bugs] [Bug 46482] New: Adopt variadic isa<> within clang code

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 27 18:31:44 PDT 2020


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

            Bug ID: 46482
           Summary: Adopt variadic isa<> within clang code
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jurahul at google.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

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 clang 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/0819c55d/attachment-0001.html>


More information about the llvm-bugs mailing list