summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
diff options
context:
space:
mode:
authorPiotr Padlewski <piotr.padlewski@gmail.com>2016-12-14 15:29:23 +0000
committerPiotr Padlewski <piotr.padlewski@gmail.com>2016-12-14 15:29:23 +0000
commit08124b110a9e1ffc285998db1abd42e72ab83c8b (patch)
treef725b8751aa4b9e95f1791bd97775d39afbcadce /clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
parentfacbd356963fcf417062e2838d676b1b29ebcf00 (diff)
downloadbcm5719-llvm-08124b110a9e1ffc285998db1abd42e72ab83c8b.tar.gz
bcm5719-llvm-08124b110a9e1ffc285998db1abd42e72ab83c8b.zip
modernize-use-auto NFC fixes
llvm-svn: 289656
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp b/clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
index e6177ba8694..00befd2e7ce 100644
--- a/clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
@@ -100,10 +100,8 @@ void ThrowByValueCatchByReferenceCheck::diagnoseThrowLocations(
if (CheckAnonymousTemporaries) {
bool emit = false;
auto *currentSubExpr = subExpr->IgnoreImpCasts();
- const DeclRefExpr *variableReference =
- dyn_cast<DeclRefExpr>(currentSubExpr);
- const CXXConstructExpr *constructorCall =
- dyn_cast<CXXConstructExpr>(currentSubExpr);
+ const auto *variableReference = dyn_cast<DeclRefExpr>(currentSubExpr);
+ const auto *constructorCall = dyn_cast<CXXConstructExpr>(currentSubExpr);
// If we have a DeclRefExpr, we flag for emitting a diagnosis message in
// case the referenced variable is neither a function parameter nor a
// variable declared in the catch statement.
OpenPOWER on IntegriCloud