From b61829887db706ac648abc56adb03c8379253208 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 20 Jan 2016 22:14:10 +0000 Subject: Make modernize-use-default tolerant of delayed template parsing; this code was previously causing failed assertions because dyn_cast was being passed a null pointer due to the delay-parsed body. llvm-svn: 258356 --- clang-tools-extra/clang-tidy/modernize/UseDefaultCheck.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang-tools-extra/clang-tidy') diff --git a/clang-tools-extra/clang-tidy/modernize/UseDefaultCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseDefaultCheck.cpp index 68ead15e224..dbc84ef3a87 100644 --- a/clang-tools-extra/clang-tidy/modernize/UseDefaultCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/UseDefaultCheck.cpp @@ -272,6 +272,7 @@ void UseDefaultCheck::check(const MatchFinder::MatchResult &Result) { // that are not user-provided (automatically generated). if (SpecialFunctionDecl->isDeleted() || SpecialFunctionDecl->isExplicitlyDefaulted() || + SpecialFunctionDecl->isLateTemplateParsed() || !SpecialFunctionDecl->isUserProvided() || !SpecialFunctionDecl->hasBody()) return; -- cgit v1.2.3