Fix CI
Ubuntu-22.04 (which is what ubuntu-latest is at the time
of writing) now has clang++-14/clang-format-14 instead of
12. Update those and reformat files. Also, make our github
action based on ubuntu-22.04 explicetly so that when latest
changes we don't break again. (Although in scenarios like
this we would still break)
Also change a forward declaration to an include to resolve
a build failure.
diff --git a/.github/workflows/cpp-ci.yml b/.github/workflows/cpp-ci.yml
index 7807a93..ca262a6 100644
--- a/.github/workflows/cpp-ci.yml
+++ b/.github/workflows/cpp-ci.yml
@@ -11,11 +11,11 @@
jobs:
build:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
env:
- CXX: clang++-12
- CLANG_FORMAT: clang-format-12
+ CXX: clang++-14
+ CLANG_FORMAT: clang-format-14
steps:
- uses: actions/checkout@v2
diff --git a/src/file_cache.h b/src/file_cache.h
index ce3be6a..a17c861 100644
--- a/src/file_cache.h
+++ b/src/file_cache.h
@@ -18,7 +18,7 @@
#include <string>
#include <unordered_set>
-class Makefile;
+#include "file.h"
class MakefileCacheManager {
public:
diff --git a/src/func.cc b/src/func.cc
index b7e1b24..75a7cb6 100644
--- a/src/func.cc
+++ b/src/func.cc
@@ -1086,7 +1086,9 @@
#define ENTRY(name, args...) \
{ \
- name, { name, args } \
+ name, { \
+ name, args \
+ } \
}
static const std::unordered_map<std::string_view, FuncInfo> g_func_info_map = {