llvm-project/clang-tools-extra/clang-tidy
Roman Lebedev a3dc9484e3 [clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR38888
Summary:
I have hit this the rough way, while trying to use this in D51870.

There is no particular point in storing the pointers, and moreover
the pointers are assumed to be non-null, and that assumption is not
enforced. If they are null, it won't be able to do anything good
with them anyway.

Initially i thought about simply adding asserts() that they are
not null, but taking/storing references looks like even cleaner solution?

Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=38888 | PR38888 ]]

Reviewers: JonasToth, shuaiwang, alexfh, george.karpenkov

Reviewed By: shuaiwang

Subscribers: xazax.hun, a.sidorin, Szelethus, cfe-commits

Tags: #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D51884

llvm-svn: 341854
2018-09-10 19:59:18 +00:00
..
abseil [clang-tidy] Abseil: Allow macros inside of absl to use internal absl things 2018-09-07 09:25:23 +00:00
android Port getLocEnd -> getEndLoc 2018-08-09 22:43:02 +00:00
boost Port getLocStart -> getBeginLoc 2018-08-09 22:42:26 +00:00
bugprone [clang-tidy] Recognize [[clang::reinitializes]] attribute in bugprone-use-after-move 2018-08-13 14:24:52 +00:00
cert Port getLocStart -> getBeginLoc 2018-08-09 22:42:26 +00:00
cppcoreguidelines Adding the readability module to the list of dependencies for the C++ Core Guidelines module. Amends r339516 for a failing bot. 2018-08-12 14:47:16 +00:00
fuchsia Port getLocEnd -> getEndLoc 2018-08-09 22:43:02 +00:00
google Port getLocEnd -> getEndLoc 2018-08-09 22:43:02 +00:00
hicpp Port getLocStart -> getBeginLoc 2018-08-09 22:42:26 +00:00
llvm Port getLocEnd -> getEndLoc 2018-08-09 22:43:02 +00:00
misc Port getLocEnd -> getEndLoc 2018-08-09 22:43:02 +00:00
modernize [clang-tidy: modernize] modernize-redundant-void-arg crashes when a function body is in a macro 2018-08-10 13:59:33 +00:00
mpi modernize-use-auto NFC fixes 2016-12-14 15:29:23 +00:00
objc [clang-tidy/ObjC] Update list of acronyms in PropertyDeclarationCheck 2018-09-07 22:02:38 +00:00
performance [clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR38888 2018-09-10 19:59:18 +00:00
plugin [clang-tidy] add all clang-tidy modules to plugin 2018-07-31 15:23:49 +00:00
portability [clang-tidy] Add "portability" module and rename readability-simd-intrinsics to portability-simd-intrinsics 2018-03-07 16:57:42 +00:00
readability Add a new check to the readability module that flags uses of "magic numbers" (both floating-point and integral). 2018-08-12 14:35:13 +00:00
tool [clang-tidy] run-clang-tidy.py - add synchronisation to the output 2018-08-10 11:50:47 +00:00
utils [clang-tidy] ExprMutationAnalyzer: construct from references. Fixes PR38888 2018-09-10 19:59:18 +00:00
zircon [clang-tidy] Add Zircon module to clang-tidy 2018-03-14 23:47:50 +00:00
CMakeLists.txt [clang-tidy] Profile is a per-AST (per-TU) data. 2018-05-08 13:14:21 +00:00
ClangTidy.cpp Fix reported range of partial token replacement 2018-09-06 20:16:34 +00:00
ClangTidy.h [clang-tidy] Store checks profiling info as JSON files 2018-06-06 15:07:51 +00:00
ClangTidyDiagnosticConsumer.cpp [clang-tidy] Store checks profiling info as JSON files 2018-06-06 15:07:51 +00:00
ClangTidyDiagnosticConsumer.h [clang-tidy] Store checks profiling info as JSON files 2018-06-06 15:07:51 +00:00
ClangTidyModule.cpp Change getChecksFilter() interface to hide implementation details. 2017-05-17 14:39:47 +00:00
ClangTidyModule.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
ClangTidyModuleRegistry.h Reapply r276973 "Adjust Registry interface to not require plugins to export a registry" 2016-08-05 11:01:08 +00:00
ClangTidyOptions.cpp [clang-tools-extra] Update uses of DEBUG macro to LLVM_DEBUG. 2018-05-15 16:37:45 +00:00
ClangTidyOptions.h [clang-tidy] Remove AnalyzeTemporaryDtors option. 2018-05-03 14:40:37 +00:00
ClangTidyProfiling.cpp [clang-tidy] Store checks profiling info as JSON files 2018-06-06 15:07:51 +00:00
ClangTidyProfiling.h [clang-tidy] Store checks profiling info as JSON files 2018-06-06 15:07:51 +00:00
add_new_check.py Add a trailing period in release notes. 2018-05-03 15:59:39 +00:00
rename_check.py [clang-tidy] Use :doc: for check links in Release Notes. 2018-03-21 17:06:13 +00:00