[all-commits] [llvm/llvm-project] fdfe32: [clang-tidy] IncludeInserter: allow <> in header name
alexfh via All-commits
all-commits at lists.llvm.org
Mon Sep 28 06:14:23 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: fdfe324da195ebd9b9c691f006b0d6ccc64365e1
https://github.com/llvm/llvm-project/commit/fdfe324da195ebd9b9c691f006b0d6ccc64365e1
Author: Alexander Kornienko <alexfh at google.com>
Date: 2020-09-28 (Mon, 28 Sep 2020)
Changed paths:
M clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.cpp
M clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.cpp
M clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp
M clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
M clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp
M clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp
M clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp
M clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp
M clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
M clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp
M clang-tools-extra/clang-tidy/utils/IncludeInserter.h
M clang-tools-extra/docs/ReleaseNotes.rst
M clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-init-variables.rst
M clang-tools-extra/docs/clang-tidy/checks/modernize-make-unique.rst
M clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-init-variables.cpp
M clang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp
Log Message:
-----------
[clang-tidy] IncludeInserter: allow <> in header name
This adds a pair of overloads for create(MainFile)?IncludeInsertion methods that
use the presence of the <> in the file name to control whether the #include
directive will use angle brackets or quotes. Motivating examples:
https://reviews.llvm.org/D82089#inline-789412 and
https://github.com/llvm/llvm-project/blob/master/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp#L433
The overloads with the IsAngled parameter can be removed after the users are
updated.
Update usages of createIncludeInsertion.
Update (almost all) usages of createMainFileIncludeInsertion.
Reviewed By: hokein
Differential Revision: https://reviews.llvm.org/D85666
More information about the All-commits
mailing list