Skip to content
Open
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
6 changes: 4 additions & 2 deletions lib/CppInterOp/CppInterOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3812,8 +3812,10 @@ TInterp_t CreateInterpreter(const std::vector<const char*>& Args /*={}*/,
(T.isOSDarwin() || T.isOSLinux()))
ResourceDir = DetectResourceDir();

std::vector<const char*> ClingArgv = {"-resource-dir", ResourceDir.c_str(),
"-std=c++14"};
std::vector<const char*> ClingArgv = {"-std=c++14"};
if (!ResourceDir.empty()) {
ClingArgv.insert(ClingArgv.begin(), {"-resource-dir", ResourceDir.c_str()});
}
Comment on lines +3816 to +3818
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!ResourceDir.empty()) {
ClingArgv.insert(ClingArgv.begin(), {"-resource-dir", ResourceDir.c_str()});
}
if (!ResourceDir.empty())
ClingArgv.insert(ClingArgv.begin(), {"-resource-dir", ResourceDir.c_str()});

ClingArgv.insert(ClingArgv.begin(), MainExecutableName.c_str());
#ifdef _WIN32
// FIXME : Workaround Sema::PushDeclContext assert on windows
Expand Down
Loading