Skip to content

Commit

Permalink
Allow double quote includes
Browse files Browse the repository at this point in the history
  • Loading branch information
kkrissian-gpfw authored and ldedier-gpfw committed Sep 12, 2024
1 parent 51096f5 commit 1cfd243
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions source/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ string file_name_prefix_for_binder(BinderOP &b)

string include = binder::relevant_include(decl);

string exceptions = "_/<>.";
string exceptions = "_/<>.\"";
include.erase(std::remove_if(include.begin(), include.end(), [&](unsigned char c) { return not(std::isalnum(c) or std::find(exceptions.begin(), exceptions.end(), c) != exceptions.end()); }),
include.end());

if( include.size() <= 2 ) {
if( include.size() <= 0 ) {
include = "<unknown/unknown.hh>";
// outs() << "Warning: file_name_prefix_for_binder could not determent file name for decl: " + string(*b) + ", result is too short!\n";
} // throw std::runtime_error( "file_name_for_decl failed!!! include name for decl: " + string(*b) + " is too short!");
Expand Down
2 changes: 1 addition & 1 deletion source/type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ string relevant_include(NamedDecl const *decl)
for( ; *data and *data != terminator; ++data ) include_string.push_back(*data);
if( *data == terminator ) include_string.push_back(*data);
}
if( include_string.size() and include_string[0] == '"' ) include_string.resize(0); // avoid adding include in quotes because compiler will not be able to find them
// if( include_string.size() and include_string[0] == '"' ) include_string.resize(0); // avoid adding include in quotes because compiler will not be able to find them
}

return include_string;
Expand Down

0 comments on commit 1cfd243

Please sign in to comment.