Commit 40003af9 authored by Shivam Gupta's avatar Shivam Gupta
Browse files

[Clang][NFC] Remove a redundancy check in Sema::adjustMemberFunctionCC

If the current calling convection CurCC is not equal to Target calling
convection ToCC and current calling convention (CurCC) is equal to the
default calling convention (DefaultCC), that means DefaultCC can not be
equal to ToCC so the right part of the expression DefaultCC == ToCC is
not needed.

revelant code -
  if (CurCC == ToCC)
    return;
  if (CurCC != DefaultCC || DefaultCC == ToCC)
    return;

Found by PVS-Studio - https://pvs-studio.com/en/blog/posts/cpp/1003/, N41.

Differential Revision: https://reviews.llvm.org/D142338
parent 0f5099cd
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment