Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,13 @@ namespace test {
return false;

// Only for demo resolve all unknown objects to cling::test::Tester
// but skip unresolved names coming from system headers,
// like __path_iter_distance from <filesystem>
clang::Sema& SemaR = m_Interpreter->getSema();
clang::SourceManager& SM = SemaR.getSourceManager();
if (SM.isInSystemHeader(R.getNameLoc()))
return false;
if (!m_TesterDecl) {
clang::Sema& SemaR = m_Interpreter->getSema();
clang::NamespaceDecl* NSD = utils::Lookup::Namespace(&SemaR, "cling");
NSD = utils::Lookup::Namespace(&SemaR, "test", NSD);
m_TesterDecl = utils::Lookup::Named(&SemaR, "Tester", NSD);
Expand Down
17 changes: 11 additions & 6 deletions interpreter/cling/test/Prompt/ValuePrinter/SourceLocation.C
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,27 @@
//------------------------------------------------------------------------------
// RUN: cat %s | %cling | FileCheck %s

.rawInput 1
#include <iostream>
#if __cplusplus >= 202002L
#include <version>
#endif

#ifndef __cpp_lib_source_location
// Hack to prevent failure if __cpp_lib_source_location feature does not exist!
std::cout << "(std::source_location) ";
std::cout << "CHECK_SRCLOC:42:std::source_location getsrcloc()\n";
#else
#ifdef __cpp_lib_source_location
#include <source_location>
std::source_location getsrcloc() {
#line 42 "CHECK_SRCLOC"
return std::source_location::current();
}
getsrcloc()
#else
// Hack to prevent failure if __cpp_lib_source_location feature does not exist!
void getsrcloc() {
std::cout << "(std::source_location) ";
std::cout << "CHECK_SRCLOC:42:std::source_location getsrcloc()\n";
}
#endif
.rawInput 0

getsrcloc()
// CHECK: (std::source_location)
// CHECK: CHECK_SRCLOC:42:std::source_location getsrcloc()
3 changes: 0 additions & 3 deletions interpreter/cling/test/Prompt/ValuePrinter/Strings.C
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ cling::printValue(&RawData)[13]
"\xed\xaf\xbf\xed\xbf\xbf"
// CHECK-NEXT: (const char[7]) "\xed\xaf\xbf\xed\xbf\xbf"

std::string(u8"UTF-8")
// CHECK-NEXT: (std::string) "UTF-8"

std::u16string(u"UTF-16 " u"\x394" u"\x3a6" u"\x3a9")
// CHECK-NEXT: (std::u16string) u"UTF-16 ΔΦΩ"

Expand Down
Loading