Page MenuHomePhabricator

[libTooling] Change `addInclude` to use expansion locs.
ClosedPublic

Authored by ymandel on Dec 22 2020, 7:06 AM.

Details

Summary

This patch changes the default range used to anchor the include insertion to use
an expansion loc. This ensures that the location is valid, when the user relies
on the default range.

Driveby: extend a FIXME for a problem that was emphasized by this change; fix some spellings.

Diff Detail

Unit TestsFailed

TimeTest
160 msx64 debian > Clang Tools.clang-tidy/checkers::abseil-string-find-str-contains.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/abseil-string-find-str-contains.cpp abseil-string-find-str-contains /mnt/disks/ssd0/agent/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/Output/abseil-string-find-str-contains.cpp.tmp -- -config="{CheckOptions: []}"
330 msx64 windows > Clang Tools.clang-tidy/checkers::abseil-string-find-str-contains.cpp
Script: -- : 'RUN: at line 1'; C:/Python38/python.exe C:/ws/w64/llvm-project/premerge-checks/clang-tools-extra/test/../test\clang-tidy\check_clang_tidy.py C:\ws\w64\llvm-project\premerge-checks\clang-tools-extra\test\clang-tidy\checkers\abseil-string-find-str-contains.cpp abseil-string-find-str-contains C:\ws\w64\llvm-project\premerge-checks\build\tools\clang\tools\extra\test\clang-tidy\checkers\Output\abseil-string-find-str-contains.cpp.tmp -- -config="{CheckOptions: []}"

Event Timeline

ymandel requested review of this revision.Dec 22 2020, 7:06 AM
ymandel created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 22 2020, 7:06 AM

Gentle ping...

tdl-g accepted this revision.Jan 14 2021, 6:42 AM
This revision is now accepted and ready to land.Jan 14 2021, 6:42 AM
This revision was landed with ongoing or failed builds.Jan 14 2021, 7:13 PM
This revision was automatically updated to reflect the committed changes.