[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check
    Bruno Ricci via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Fri Feb  5 10:59:39 PST 2021
    
    
  
riccibruno added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:337
+  if (Name.empty())
+    Name = "<unnamed>";
+  return Name;
----------------
I think that this will become unreachable after D84658 and D85033. I may be missing an argument, but in general I would argue that `getNameForDiagnostic` should never return an empty name for unnamed entities since this is not useful in diagnostics.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69560/new/
https://reviews.llvm.org/D69560
    
    
More information about the cfe-commits
mailing list