diff options
Diffstat (limited to 'clang/unittests/Interpreter/InterpreterTest.cpp')
-rw-r--r-- | clang/unittests/Interpreter/InterpreterTest.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clang/unittests/Interpreter/InterpreterTest.cpp index 0f546d2..1800bff 100644 --- a/clang/unittests/Interpreter/InterpreterTest.cpp +++ b/clang/unittests/Interpreter/InterpreterTest.cpp @@ -234,16 +234,10 @@ TEST(IncrementalProcessing, FindMangledNameSymbol) { } std::string MangledName = MangleName(FD); - auto Addr = Interp->getSymbolAddress(MangledName); - EXPECT_FALSE(!Addr); - EXPECT_NE(0U, Addr->getValue()); + auto Addr = cantFail(Interp->getSymbolAddress(MangledName)); + EXPECT_NE(0U, Addr.getValue()); GlobalDecl GD(FD); - EXPECT_EQ(*Addr, cantFail(Interp->getSymbolAddress(GD))); - cantFail( - Interp->ParseAndExecute("extern \"C\" int printf(const char*,...);")); - Addr = Interp->getSymbolAddress("printf"); - EXPECT_FALSE(!Addr); - EXPECT_EQ((unsigned long long)&printf, Addr->getValue()); + EXPECT_EQ(Addr, cantFail(Interp->getSymbolAddress(GD))); } static void *AllocateObject(TypeDecl *TD, Interpreter &Interp) { |