-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Miscellaneous bugfixes #23
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
#include <type_traits> | ||
|
||
#include <sparta/AbstractDomain.h> | ||
#include <sparta/Exceptions.h> | ||
|
||
namespace sparta { | ||
namespace pad_impl { | ||
|
@@ -235,6 +236,9 @@ class PowersetAbstractDomain | |
return this->get_value()->contains(e); | ||
} | ||
} | ||
SPARTA_ASSERT(false && "unknown AbstractValueKind"); | ||
// Return false to suppress -Wreturn-type warning reported by gcc | ||
return false; | ||
Comment on lines
+239
to
+241
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm curious to see if a different compiler that understands the switch case always returns would give a warning here mentioning that this is dead code There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. clang 16 does not raise any warnings here with |
||
} | ||
|
||
friend std::ostream& operator<<(std::ostream& o, const Derived& s) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
file(GLOB test "*.cpp") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add our license header
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
|
||
foreach(testfile ${test}) | ||
# ${testfile} is in the format of SomeTest.cpp | ||
string(REPLACE ".cpp" "_test" no_ext_name ${testfile}) | ||
# ${no_ext_name} is in the format of SomeTest_test | ||
get_filename_component(test_bin ${no_ext_name} NAME) | ||
# ${test_bin} is in the format of SomeTest_test | ||
add_executable(${test_bin} ${testfile}) | ||
target_link_libraries(${test_bin} PRIVATE sparta gmock_main) | ||
add_test(NAME ${testfile} COMMAND ${test_bin}) | ||
endforeach() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to include:
Otherwise we are getting the error:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed