forked from BigfootDev/flatbuffers
[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:
@@ -426,6 +426,7 @@ else()
|
|||||||
|
|
||||||
# This isn't working for some reason: $<$<CXX_COMPILER_ID:CLANG>:
|
# This isn't working for some reason: $<$<CXX_COMPILER_ID:CLANG>:
|
||||||
$<$<BOOL:${IS_CLANG}>:
|
$<$<BOOL:${IS_CLANG}>:
|
||||||
|
-Wnewline-eof
|
||||||
-Wno-unknown-warning-option
|
-Wno-unknown-warning-option
|
||||||
-Wmissing-declarations
|
-Wmissing-declarations
|
||||||
-Wzero-as-null-pointer-constant
|
-Wzero-as-null-pointer-constant
|
||||||
|
|||||||
@@ -65,4 +65,4 @@ class Allocator {
|
|||||||
|
|
||||||
} // namespace flatbuffers
|
} // namespace flatbuffers
|
||||||
|
|
||||||
#endif // FLATBUFFERS_ALLOCATOR_H_
|
#endif // FLATBUFFERS_ALLOCATOR_H_
|
||||||
|
|||||||
@@ -50,4 +50,4 @@ template<typename T> struct BufferRef : BufferRefBase {
|
|||||||
|
|
||||||
} // namespace flatbuffers
|
} // 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
|
} // 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
|
} // namespace flatbuffers
|
||||||
|
|
||||||
#endif // FLATBUFFERS_STRING_H_
|
#endif // FLATBUFFERS_STRING_H_
|
||||||
|
|||||||
@@ -50,4 +50,4 @@ class Struct FLATBUFFERS_FINAL_CLASS {
|
|||||||
|
|
||||||
} // namespace flatbuffers
|
} // 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));
|
return std::unique_ptr<LuaBfbsGenerator>(new LuaBfbsGenerator(flatc_version));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace flatbuffers
|
} // namespace flatbuffers
|
||||||
|
|||||||
@@ -30,4 +30,4 @@ std::unique_ptr<BfbsGenerator> NewLuaBfbsGenerator(
|
|||||||
|
|
||||||
} // namespace flatbuffers
|
} // namespace flatbuffers
|
||||||
|
|
||||||
#endif // FLATBUFFERS_BFBS_GEN_LUA_H_
|
#endif // FLATBUFFERS_BFBS_GEN_LUA_H_
|
||||||
|
|||||||
@@ -48,4 +48,4 @@ class BfbsNamer : public Namer {
|
|||||||
|
|
||||||
} // namespace flatbuffers
|
} // namespace flatbuffers
|
||||||
|
|
||||||
#endif // FLATBUFFERS_BFBS_NAMER
|
#endif // FLATBUFFERS_BFBS_NAMER
|
||||||
|
|||||||
@@ -389,4 +389,4 @@ class BinaryAnnotator {
|
|||||||
|
|
||||||
} // namespace flatbuffers
|
} // namespace flatbuffers
|
||||||
|
|
||||||
#endif // FLATBUFFERS_BINARY_ANNOTATOR_H_
|
#endif // FLATBUFFERS_BINARY_ANNOTATOR_H_
|
||||||
|
|||||||
@@ -13,4 +13,4 @@ void ParseFlexbuffersFromJsonWithNullTest();
|
|||||||
} // namespace tests
|
} // namespace tests
|
||||||
} // namespace flatbuffers
|
} // namespace flatbuffers
|
||||||
|
|
||||||
#endif // TESTS_FLEXBUFFERS_TEST_H
|
#endif // TESTS_FLEXBUFFERS_TEST_H
|
||||||
|
|||||||
@@ -171,4 +171,4 @@ void JsonUnsortedArrayTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace tests
|
} // namespace tests
|
||||||
} // namespace flatbuffers
|
} // namespace flatbuffers
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ void JsonUnsortedArrayTest();
|
|||||||
} // namespace tests
|
} // namespace tests
|
||||||
} // namespace flatbuffers
|
} // namespace flatbuffers
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -35,4 +35,4 @@ void UnPackTo(const uint8_t *flatbuf);
|
|||||||
} // namespace tests
|
} // namespace tests
|
||||||
} // namespace flatbuffers
|
} // namespace flatbuffers
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -98,4 +98,4 @@ void OptionalScalarsTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,4 +30,4 @@ void FieldIdentifierTest();
|
|||||||
} // namespace tests
|
} // namespace tests
|
||||||
} // namespace flatbuffers
|
} // namespace flatbuffers
|
||||||
|
|
||||||
#endif // TESTS_PARSER_TEST_H
|
#endif // TESTS_PARSER_TEST_H
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ void ParseProtoBufAsciiTest();
|
|||||||
} // namespace tests
|
} // namespace tests
|
||||||
} // namespace flatbuffers
|
} // namespace flatbuffers
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user