r359551 - Fix gcc "-Wdangling-else" warning. NFCI.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 30 03:57:38 PDT 2019
Author: rksimon
Date: Tue Apr 30 03:57:37 2019
New Revision: 359551
URL: http://llvm.org/viewvc/llvm-project?rev=359551&view=rev
Log:
Fix gcc "-Wdangling-else" warning. NFCI.
Modified:
cfe/trunk/unittests/Tooling/LookupTest.cpp
Modified: cfe/trunk/unittests/Tooling/LookupTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/LookupTest.cpp?rev=359551&r1=359550&r2=359551&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/LookupTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/LookupTest.cpp Tue Apr 30 03:57:37 2019
@@ -217,8 +217,9 @@ TEST(LookupTest, replaceNestedClassName)
// `x::y::Foo` in c.cc [1], it should not make "Foo" at [0] ambiguous because
// it's not visible at [0].
Visitor.OnRecordTypeLoc = [&](RecordTypeLoc Type) {
- if (Type.getDecl()->getQualifiedNameAsString() == "x::y::Old")
+ if (Type.getDecl()->getQualifiedNameAsString() == "x::y::Old") {
EXPECT_EQ("Foo", replaceRecordTypeLoc(Type, "::x::Foo"));
+ }
};
Visitor.runOver(R"(
// a.h
More information about the cfe-commits
mailing list