diff options
author | Galina Kistanova <gkistanova@gmail.com> | 2017-06-15 21:01:24 +0000 |
---|---|---|
committer | Galina Kistanova <gkistanova@gmail.com> | 2017-06-15 21:01:24 +0000 |
commit | 45fbb597ec728c083abb6bc2b8dace359d8299d2 (patch) | |
tree | 88097e4024b36f5195457bdf23ec0257b8054876 /clang/unittests/Tooling/LookupTest.cpp | |
parent | fcae62d6eeabf0eb926555d56e6a79d880ef094b (diff) | |
download | bcm5719-llvm-45fbb597ec728c083abb6bc2b8dace359d8299d2.tar.gz bcm5719-llvm-45fbb597ec728c083abb6bc2b8dace359d8299d2.zip |
Added braces to work around gcc warning in googletest: suggest explicit braces to avoid ambiguous 'else'. NFC.
llvm-svn: 305507
Diffstat (limited to 'clang/unittests/Tooling/LookupTest.cpp')
-rw-r--r-- | clang/unittests/Tooling/LookupTest.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/unittests/Tooling/LookupTest.cpp b/clang/unittests/Tooling/LookupTest.cpp index cc3922d01b5..f42f31e9dd9 100644 --- a/clang/unittests/Tooling/LookupTest.cpp +++ b/clang/unittests/Tooling/LookupTest.cpp @@ -143,8 +143,9 @@ TEST(LookupTest, replaceNestedClassName) { Visitor.OnRecordTypeLoc = [&](RecordTypeLoc Type) { // Filter Types by name since there are other `RecordTypeLoc` in the test // file. - if (Type.getDecl()->getQualifiedNameAsString() == "a::b::Foo") + if (Type.getDecl()->getQualifiedNameAsString() == "a::b::Foo") { EXPECT_EQ("x::Bar", replaceRecordTypeLoc(Type, "::a::x::Bar")); + } }; Visitor.runOver("namespace a { namespace b {\n" "class Foo;\n" @@ -155,8 +156,9 @@ TEST(LookupTest, replaceNestedClassName) { // Filter Types by name since there are other `RecordTypeLoc` in the test // file. // `a::b::Foo` in using shadow decl is not `TypeLoc`. - if (Type.getDecl()->getQualifiedNameAsString() == "a::b::Foo") + if (Type.getDecl()->getQualifiedNameAsString() == "a::b::Foo") { EXPECT_EQ("Bar", replaceRecordTypeLoc(Type, "::a::x::Bar")); + } }; Visitor.runOver("namespace a { namespace b { class Foo {}; } }\n" "namespace c { using a::b::Foo; Foo f();; }\n"); |