summaryrefslogtreecommitdiffstats
path: root/clang/unittests/AST/ASTImporterTest.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-04-30 10:57:02 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-04-30 10:57:02 +0000
commit85f61257d24f0fe08e11eb0a05e41f2419106233 (patch)
tree5d38c84118bdc17842ffefa755fc830b2dd5cc1d /clang/unittests/AST/ASTImporterTest.cpp
parent562f5f04f516eefd46cb8923ae8a06036e7ddb9c (diff)
downloadbcm5719-llvm-85f61257d24f0fe08e11eb0a05e41f2419106233.tar.gz
bcm5719-llvm-85f61257d24f0fe08e11eb0a05e41f2419106233.zip
Fix gcc "-Wdangling-else" warnings. NFCI.
llvm-svn: 359550
Diffstat (limited to 'clang/unittests/AST/ASTImporterTest.cpp')
-rw-r--r--clang/unittests/AST/ASTImporterTest.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/unittests/AST/ASTImporterTest.cpp b/clang/unittests/AST/ASTImporterTest.cpp
index 07a7c3aea81..7cac2b57036 100644
--- a/clang/unittests/AST/ASTImporterTest.cpp
+++ b/clang/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() {
OpenPOWER on IntegriCloud