diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-04-30 10:57:02 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-04-30 10:57:02 +0000 |
commit | f8cb6c3418c7171f4d726d69ba302b7e0f2d23f6 (patch) | |
tree | 5d33c8e9066d736e863795776706b58e774443a9 | |
parent | bbce6781086684deafc9a99d1f9bc6783aa70787 (diff) |
Fix gcc "-Wdangling-else" warnings. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359550 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | unittests/AST/ASTImporterTest.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/unittests/AST/ASTImporterTest.cpp b/unittests/AST/ASTImporterTest.cpp index 07a7c3aea8..7cac2b5703 100644 --- a/unittests/AST/ASTImporterTest.cpp +++ b/unittests/AST/ASTImporterTest.cpp @@ -4137,8 +4137,9 @@ struct RedeclChain : ASTImporterOptionSpecificTestBase { auto *ToD = LastDeclMatcher<DeclTy>().match(ToTU, getPattern()); EXPECT_TRUE(ImportedD == ToD); EXPECT_FALSE(ToD->isThisDeclarationADefinition()); - if (auto *ToT = dyn_cast<TemplateDecl>(ToD)) + if (auto *ToT = dyn_cast<TemplateDecl>(ToD)) { EXPECT_TRUE(ToT->getTemplatedDecl()); + } } void TypedTest_DefinitionShouldBeImportedAsADefinition() { @@ -4152,8 +4153,9 @@ struct RedeclChain : ASTImporterOptionSpecificTestBase { EXPECT_EQ(DeclCounter<DeclTy>().match(ToTU, getPattern()), 1u); auto *ToD = LastDeclMatcher<DeclTy>().match(ToTU, getPattern()); EXPECT_TRUE(ToD->isThisDeclarationADefinition()); - if (auto *ToT = dyn_cast<TemplateDecl>(ToD)) + if (auto *ToT = dyn_cast<TemplateDecl>(ToD)) { EXPECT_TRUE(ToT->getTemplatedDecl()); + } } void TypedTest_ImportPrototypeAfterImportedPrototype() { @@ -4266,8 +4268,9 @@ struct RedeclChain : ASTImporterOptionSpecificTestBase { auto *To0 = FirstDeclMatcher<DeclTy>().match(ToTU, getPattern()); EXPECT_TRUE(Imported0 == To0); EXPECT_TRUE(To0->isThisDeclarationADefinition()); - if (auto *ToT0 = dyn_cast<TemplateDecl>(To0)) + if (auto *ToT0 = dyn_cast<TemplateDecl>(To0)) { EXPECT_TRUE(ToT0->getTemplatedDecl()); + } } void TypedTest_ImportDefinitionThenPrototype() { |