Skip to content

Commit

Permalink
CMakeLists.txt: -Weverything
Browse files Browse the repository at this point in the history
  • Loading branch information
langston-barrett committed Nov 2, 2022
1 parent 78ce814 commit ba41f0a
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 28 deletions.
45 changes: 28 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,19 @@ target_compile_options(
SoufflePA
PUBLIC -fopenmp
-Werror
-Werror=all
-Werror=conversion
-Werror=extra
-Werror=pedantic
-Werror=return-type
-Werror=sign-conversion
-Werror=switch
-Wno-error=deprecated-declarations)
-Weverything
-Wno-c++98-c++11-compat-pedantic
-Wno-c++98-compat
-Wno-c++98-compat-pedantic
-Wno-documentation
-Wno-error=deprecated-declarations
-Wno-error=unused-macros
-Wno-exit-time-destructors
-Wno-global-constructors
-Wno-padded
-Wno-shadow
-Wno-undefined-func-template
-Wno-weak-vtables)

target_include_directories(SoufflePA SYSTEM PUBLIC ${SOUFFLE_INCLUDE})

Expand Down Expand Up @@ -150,15 +155,21 @@ endif()
# Warnings
target_compile_options(
PAPass
PUBLIC -Werror
-Werror=all
-Werror=conversion
-Werror=extra
-Werror=pedantic
-Werror=return-type
-Werror=sign-conversion
-Werror=switch
-fopenmp)
PUBLIC -fopenmp
-Werror
-Weverything
-Wno-c++98-c++11-compat-pedantic
-Wno-c++98-compat
-Wno-c++98-compat-pedantic
-Wno-documentation
-Wno-error=deprecated-declarations
-Wno-error=unused-macros
-Wno-exit-time-destructors
-Wno-global-constructors
-Wno-padded
-Wno-shadow
-Wno-undefined-func-template
-Wno-weak-vtables)

target_link_libraries(PAPass PRIVATE PAPassInterface SoufflePA
Boost::filesystem)
Expand Down
3 changes: 1 addition & 2 deletions FactGenerator/src/FactGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ auto FactGenerator::getInstance(FactWriter &writer) -> FactGenerator & {

/* NOTE(ww): Stolen from Demangle.cpp (not present in LLVM 7).
*/
static inline __attribute__((unused)) auto is_itanium_encoding(
const std::string &MangledName) -> bool {
static inline auto is_itanium_encoding(const std::string &MangledName) -> bool {
size_t Pos = MangledName.find_first_not_of('_');
// A valid Itanium encoding requires 1-4 leading underscores, followed by
// 'Z'.
Expand Down
1 change: 0 additions & 1 deletion FactGenerator/src/InstructionVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,6 @@ static auto atomic_binop_string(const llvm::AtomicRMWInst::BinOp &op)
#endif
case llvm::AtomicRMWInst::BAD_BINOP:
malformedModule("bad atomicrmw binop");
break;
} // -Wswitch prevents fallthrough, no need for default case
assert(false);
}
Expand Down
2 changes: 1 addition & 1 deletion src/PAInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ auto extract_from_row(
if constexpr (std::is_same<T, const llvm::Value *>::value) {
try {
return llvm_val_map.at(boost::flyweight<std::string>(t0));
} catch (const std::out_of_range &e) {
} catch (const std::out_of_range &) {
std::cout << "Failed value* lookup: " << t0 << std::endl;
exit(EXIT_FAILURE);
}
Expand Down
12 changes: 6 additions & 6 deletions src/PointerAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ enum class Analysis {
};

namespace cclyzer {
llvm::cl::opt<Analysis> datalog_analysis(
static llvm::cl::opt<Analysis> datalog_analysis(
"datalog-analysis",
llvm::cl::desc("Which pointer analysis to variant run"),
llvm::cl::values(
Expand All @@ -38,25 +38,25 @@ llvm::cl::opt<Analysis> datalog_analysis(
"unification",
"unification analysis only")));

llvm::cl::opt<bool> datalog_debug_option(
static llvm::cl::opt<bool> datalog_debug_option(
"debug-datalog",
llvm::cl::desc("Keep intermediate files generated by datalog"),
llvm::cl::init(false));

llvm::cl::opt<std::string> datalog_debug_dir_option(
static llvm::cl::opt<std::string> datalog_debug_dir_option(
"debug-datalog-dir",
llvm::cl::desc("Where to keep intermediate files generated by datalog"),
llvm::cl::init((fs::temp_directory_path() / fs::unique_path()).native()));

llvm::cl::opt<bool> datalog_check_assertions_option(
static llvm::cl::opt<bool> datalog_check_assertions_option(
"check-datalog-assertions",
llvm::cl::desc("Check assertions in the datalog code"),
llvm::cl::init(false));

llvm::cl::opt<std::string> signatures(
static llvm::cl::opt<std::string> signatures(
"signatures", llvm::cl::desc("File with points-to signatures"));

llvm::cl::opt<ContextSensitivity> context_sensitivity(
static llvm::cl::opt<ContextSensitivity> context_sensitivity(
"context-sensitivity",
llvm::cl::desc("Set the context sensitivity of the pointer analysis"),
llvm::cl::values(
Expand Down
2 changes: 1 addition & 1 deletion src/PointerAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class PointerAnalysisAAResult
allocation_sizes_(allocation_sizes),
allocation_sites_(allocation_sites),
null_ptr_set_(null_ptr_set),
callgraph_(callgraph){};
callgraph_(callgraph) {}

auto alias(
const llvm::MemoryLocation&,
Expand Down

0 comments on commit ba41f0a

Please sign in to comment.