Page MenuHomePhabricator

Added llvm-string-referencing check
Needs ReviewPublic

Authored by bogser01 on Sep 25 2020, 8:35 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Clang-tidy pass detecting the use of const std::string& references.

Use of llvm::StringRef is recommended in the LLVM Programmer's Manual instead:
https://llvm.org/docs/ProgrammersManual.html#the-stringref-class

Diff Detail

Unit TestsFailed

TimeTest
360 mslinux > Clang Tools.clang-tidy/checkers::llvm-string-referencing.cpp
Script: -- : 'RUN: at line 1'; /usr/bin/python3.8 /mnt/disks/ssd0/agent/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /mnt/disks/ssd0/agent/llvm-project/clang-tools-extra/test/clang-tidy/checkers/llvm-string-referencing.cpp llvm-string-referencing /mnt/disks/ssd0/agent/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/Output/llvm-string-referencing.cpp.tmp
30 mslinux > LLVM.Assembler::disubprogram.ll
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/bin/llvm-as < /mnt/disks/ssd0/agent/llvm-project/llvm/test/Assembler/disubprogram.ll | /mnt/disks/ssd0/agent/llvm-project/build/bin/llvm-dis | /mnt/disks/ssd0/agent/llvm-project/build/bin/llvm-as | /mnt/disks/ssd0/agent/llvm-project/build/bin/llvm-dis | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/Assembler/disubprogram.ll
20 mslinux > LLVM.Bitcode::DISubprogram-v4.ll
Script: -- : 'RUN: at line 3'; /mnt/disks/ssd0/agent/llvm-project/build/bin/llvm-dis < /mnt/disks/ssd0/agent/llvm-project/llvm/test/Bitcode/DISubprogram-v4.ll.bc | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/Bitcode/DISubprogram-v4.ll

Event Timeline

bogser01 created this revision.Sep 25 2020, 8:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 25 2020, 8:35 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
bogser01 requested review of this revision.Sep 25 2020, 8:35 AM
bogser01 updated this revision to Diff 294331.Sep 25 2020, 8:46 AM

Changed upstream