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

            Bug ID: 51694
           Summary: [missed optimization opportunity] clang still
                    generates code for empty std::map iteration
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

Created attachment 25208
  --> https://bugs.llvm.org/attachment.cgi?id=25208&action=edit
testcase.cpp

The attached testcase iterates through the std::map object with empty for-body.

clang-14 still generates some code in this function when it should be empty.

Replacing the type of the argument with std::vector correctly leads to an empty
function.

-- 
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