diff options
author | Aaron Puchert <aaron.puchert@sap.com> | 2019-03-19 00:14:46 +0000 |
---|---|---|
committer | Aaron Puchert <aaron.puchert@sap.com> | 2019-03-19 00:14:46 +0000 |
commit | 8478675074cc50d3534e966bd1c8488e6f8fcfef (patch) | |
tree | 9e6b8f1c819ab4460381d0bbb252ac62ca0cb52f | |
parent | ae6410c918412e7921d3722e20b3a5600ae3e46c (diff) | |
download | clang-8478675074cc50d3534e966bd1c8488e6f8fcfef.tar.gz |
Minor renaming as suggested in review [NFC]
See D59455.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356430 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Analysis/Analyses/ThreadSafety.h | 9 | ||||
-rw-r--r-- | lib/Sema/AnalysisBasedWarnings.cpp | 22 |
2 files changed, 16 insertions, 15 deletions
diff --git a/include/clang/Analysis/Analyses/ThreadSafety.h b/include/clang/Analysis/Analyses/ThreadSafety.h index 79cdac2527..18659aa4e5 100644 --- a/include/clang/Analysis/Analyses/ThreadSafety.h +++ b/include/clang/Analysis/Analyses/ThreadSafety.h @@ -120,20 +120,21 @@ public: /// \param Expected -- the kind of lock expected. /// \param Received -- the kind of lock received. /// \param LocLocked -- The SourceLocation of the Lock. - /// \param Loc -- The SourceLocation of the Unlock. + /// \param LocUnlock -- The SourceLocation of the Unlock. virtual void handleIncorrectUnlockKind(StringRef Kind, Name LockName, LockKind Expected, LockKind Received, SourceLocation LocLocked, - SourceLocation Loc) {} + SourceLocation LocUnlock) {} /// Warn about lock function calls for locks which are already held. /// \param Kind -- the capability's name parameter (role, mutex, etc). /// \param LockName -- A StringRef name for the lock expression, to be printed /// in the error message. /// \param LocLocked -- The location of the first lock expression. - /// \param Loc -- The location of the second lock expression. + /// \param LocDoubleLock -- The location of the second lock expression. virtual void handleDoubleLock(StringRef Kind, Name LockName, - SourceLocation LocLocked, SourceLocation Loc) {} + SourceLocation LocLocked, + SourceLocation LocDoubleLock) {} /// Warn about situations where a mutex is sometimes held and sometimes not. /// The three situations are: diff --git a/lib/Sema/AnalysisBasedWarnings.cpp b/lib/Sema/AnalysisBasedWarnings.cpp index 00fa33f960..d4aa701867 100644 --- a/lib/Sema/AnalysisBasedWarnings.cpp +++ b/lib/Sema/AnalysisBasedWarnings.cpp @@ -1687,22 +1687,22 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler { void handleIncorrectUnlockKind(StringRef Kind, Name LockName, LockKind Expected, LockKind Received, SourceLocation LocLocked, - SourceLocation Loc) override { - if (Loc.isInvalid()) - Loc = FunLocation; - PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_unlock_kind_mismatch) - << Kind << LockName << Received - << Expected); + SourceLocation LocUnlock) override { + if (LocUnlock.isInvalid()) + LocUnlock = FunLocation; + PartialDiagnosticAt Warning( + LocUnlock, S.PDiag(diag::warn_unlock_kind_mismatch) + << Kind << LockName << Received << Expected); Warnings.emplace_back(std::move(Warning), makeLockedHereNote(LocLocked, Kind)); } void handleDoubleLock(StringRef Kind, Name LockName, SourceLocation LocLocked, - SourceLocation Loc) override { - if (Loc.isInvalid()) - Loc = FunLocation; - PartialDiagnosticAt Warning(Loc, S.PDiag(diag::warn_double_lock) - << Kind << LockName); + SourceLocation LocDoubleLock) override { + if (LocDoubleLock.isInvalid()) + LocDoubleLock = FunLocation; + PartialDiagnosticAt Warning(LocDoubleLock, S.PDiag(diag::warn_double_lock) + << Kind << LockName); Warnings.emplace_back(std::move(Warning), makeLockedHereNote(LocLocked, Kind)); } |