mirror of
https://github.com/google/flatbuffers.git
synced 2025-04-09 00:12:15 +08:00
[C++] Fix clang -Wnewline-eof
warning (#7711)
* Fix clang -Wnewline-eof warning * Enable -Wnewline-eof warning Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
parent
52d1b77941
commit
9927747d4e
@ -426,6 +426,7 @@ else()
|
||||
|
||||
# This isn't working for some reason: $<$<CXX_COMPILER_ID:CLANG>:
|
||||
$<$<BOOL:${IS_CLANG}>:
|
||||
-Wnewline-eof
|
||||
-Wno-unknown-warning-option
|
||||
-Wmissing-declarations
|
||||
-Wzero-as-null-pointer-constant
|
||||
|
@ -65,4 +65,4 @@ class Allocator {
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_ALLOCATOR_H_
|
||||
#endif // FLATBUFFERS_ALLOCATOR_H_
|
||||
|
@ -50,4 +50,4 @@ template<typename T> struct BufferRef : BufferRefBase {
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_BUFFER_REF_H_
|
||||
#endif // FLATBUFFERS_BUFFER_REF_H_
|
||||
|
@ -61,4 +61,4 @@ inline uint8_t *ReallocateDownward(Allocator *allocator, uint8_t *old_p,
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_DEFAULT_ALLOCATOR_H_
|
||||
#endif // FLATBUFFERS_DEFAULT_ALLOCATOR_H_
|
||||
|
@ -61,4 +61,4 @@ static inline flatbuffers::string_view GetStringView(const String *str) {
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_STRING_H_
|
||||
#endif // FLATBUFFERS_STRING_H_
|
||||
|
@ -50,4 +50,4 @@ class Struct FLATBUFFERS_FINAL_CLASS {
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_STRUCT_H_
|
||||
#endif // FLATBUFFERS_STRUCT_H_
|
||||
|
@ -630,4 +630,4 @@ std::unique_ptr<BfbsGenerator> NewLuaBfbsGenerator(
|
||||
return std::unique_ptr<LuaBfbsGenerator>(new LuaBfbsGenerator(flatc_version));
|
||||
}
|
||||
|
||||
} // namespace flatbuffers
|
||||
} // namespace flatbuffers
|
||||
|
@ -30,4 +30,4 @@ std::unique_ptr<BfbsGenerator> NewLuaBfbsGenerator(
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_BFBS_GEN_LUA_H_
|
||||
#endif // FLATBUFFERS_BFBS_GEN_LUA_H_
|
||||
|
@ -48,4 +48,4 @@ class BfbsNamer : public Namer {
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_BFBS_NAMER
|
||||
#endif // FLATBUFFERS_BFBS_NAMER
|
||||
|
@ -389,4 +389,4 @@ class BinaryAnnotator {
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_BINARY_ANNOTATOR_H_
|
||||
#endif // FLATBUFFERS_BINARY_ANNOTATOR_H_
|
||||
|
@ -13,4 +13,4 @@ void ParseFlexbuffersFromJsonWithNullTest();
|
||||
} // namespace tests
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // TESTS_FLEXBUFFERS_TEST_H
|
||||
#endif // TESTS_FLEXBUFFERS_TEST_H
|
||||
|
@ -171,4 +171,4 @@ void JsonUnsortedArrayTest() {
|
||||
}
|
||||
|
||||
} // namespace tests
|
||||
} // namespace flatbuffers
|
||||
} // namespace flatbuffers
|
||||
|
@ -15,4 +15,4 @@ void JsonUnsortedArrayTest();
|
||||
} // namespace tests
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -35,4 +35,4 @@ void UnPackTo(const uint8_t *flatbuf);
|
||||
} // namespace tests
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -98,4 +98,4 @@ void OptionalScalarsTest() {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,4 +30,4 @@ void FieldIdentifierTest();
|
||||
} // namespace tests
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // TESTS_PARSER_TEST_H
|
||||
#endif // TESTS_PARSER_TEST_H
|
||||
|
@ -15,4 +15,4 @@ void ParseProtoBufAsciiTest();
|
||||
} // namespace tests
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user