mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Swift: add -Wno-pragma-once-outside-header to check
This commit is contained in:
@@ -18,7 +18,8 @@ genrule(
|
||||
# see if https://cplusplus.github.io/LWG/issue3657 is fixed with the current compiler or not
|
||||
# if fixed, PathHash.h.workaround will not compile
|
||||
cmd = "\n".join([
|
||||
"if $(CC) -c -x c++ -std=c++17 $(rootpath PathHash.h.workaround) -o /dev/null &> /dev/null; then",
|
||||
"if $(CC) -c -x c++ -std=c++17 -Wno-pragma-once-outside-header \\",
|
||||
" $(rootpath PathHash.h.workaround) -o /dev/null &> /dev/null; then",
|
||||
" cp $(rootpath PathHash.h.workaround) $@",
|
||||
"else",
|
||||
" cp $(rootpath PathHash.h.fixed) $@",
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
// std::variant would not kick in (we use std::filesystem::path in a variant used as a map key).
|
||||
namespace std {
|
||||
template <>
|
||||
struct std::hash<std::filesystem::path> {
|
||||
std::size_t operator()(const std::filesystem::path& path) const { return hash_value(path); }
|
||||
struct hash<filesystem::path> {
|
||||
size_t operator()(const filesystem::path& path) const { return hash_value(path); }
|
||||
};
|
||||
|
||||
} // namespace std
|
||||
|
||||
Reference in New Issue
Block a user