Merge pull request #2600 from reyoung/feature/moving_compiler_flags_to_platform
Adding platform/must_check.hgangliao-patch-1
commit
109fc93bf9
@ -0,0 +1,10 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <paddle/platform/must_check.h>
|
||||
|
||||
int __must_check SomeFunctionMustCheck() { return 0; }
|
||||
|
||||
TEST(MustCheck, all) {
|
||||
// This line should not be compiled, because the
|
||||
// return value of SomeFunctionMustCheck marked as __must_check
|
||||
// SomeFunctionMustCheck();
|
||||
}
|
Loading…
Reference in new issue