]> granicus.if.org Git - clang/commit
[analyzer][NFC] Refactoring BugReporter.cpp P4.: If it can be const, make it const
authorKristof Umann <dkszelethus@gmail.com>
Tue, 13 Aug 2019 18:48:08 +0000 (18:48 +0000)
committerKristof Umann <dkszelethus@gmail.com>
Tue, 13 Aug 2019 18:48:08 +0000 (18:48 +0000)
commitfedc6539be61a7e21bd23b17db9d8d27f1201ee3
treef7eeb9894343c68f410ca531eb0d36128faaca87
parent8ac879c039dc6e6fd4a5984416d5acaf8b5a7764
[analyzer][NFC] Refactoring BugReporter.cpp P4.: If it can be const, make it const

When I'm new to a file/codebase, I personally find C++'s strong static type
system to be a great aid. BugReporter.cpp is still painful to read however:
function calls are made with mile long parameter lists, seemingly all of them
taken with a non-const reference/pointer. This patch fixes nothing but this:
make a few things const, and hammer it until it compiles.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@368735 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
include/clang/Analysis/AnalysisDeclContext.h
include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h
include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
lib/StaticAnalyzer/Checkers/MallocChecker.cpp
lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp
lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
lib/StaticAnalyzer/Core/BugReporter.cpp
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
lib/StaticAnalyzer/Core/CallEvent.cpp
lib/StaticAnalyzer/Core/ExplodedGraph.cpp