Skip to content

Commit

Permalink
Fix various build problems (#70)
Browse files Browse the repository at this point in the history
Problems resolved are:

 - Ignoring a multiline comment in LLVM9
 - Adding return statements to methods where gcc cannot deduct
   that a case will always result in a return being executed.

Co-authored-by: Morten W. Jørgensen <Morten@comepile.it>
  • Loading branch information
mowijo and Morten W. Jørgensen authored Mar 18, 2022
1 parent 5fd0556 commit 8d9c64d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ target_include_directories(hyde PUBLIC ${LLVM_INCLUDE_DIRS})
target_include_directories(hyde PUBLIC ${PROJECT_SOURCE_DIR}/submodules/yaml-cpp/include/)
target_include_directories(hyde PUBLIC ${PROJECT_SOURCE_DIR}/submodules/json/include/)

target_compile_options(hyde PUBLIC -Wall -Werror -Wno-range-loop-analysis -DHYDE_FORCE_BOOST_FILESYSTEM=1)
target_compile_options(hyde PUBLIC -Wall -Wno-comment -Werror -Wno-range-loop-analysis -DHYDE_FORCE_BOOST_FILESYSTEM=1)

target_link_libraries(hyde
${Boost_FILESYSTEM_LIBRARY}
Expand Down
2 changes: 2 additions & 0 deletions emitters/yaml_base_emitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ hyde::json yaml_to_json(const YAML::Node& yaml) {
throw std::runtime_error("YAML is not defined!");
} break;
}
return hyde::json();
}

/**************************************************************************************************/
Expand Down Expand Up @@ -132,6 +133,7 @@ YAML::Node json_to_yaml(const hyde::json& json) {
throw std::runtime_error("Discarded JSON value");
} break;
}
return YAML::Node();
}

/**************************************************************************************************/
Expand Down
2 changes: 2 additions & 0 deletions matchers/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,8 @@ bool AccessCheck(ToolAccessFilter hyde_filter, clang::AccessSpecifier clang_acce
return false;
}
}

return false;
}

/**************************************************************************************************/
Expand Down
1 change: 1 addition & 0 deletions matchers/utilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ inline std::string to_string(clang::AccessSpecifier access) {
case clang::AccessSpecifier::AS_none:
return "none";
}
return "unknown";
}

/**************************************************************************************************/
Expand Down

0 comments on commit 8d9c64d

Please # to comment.