Skip to content

Commit d6d2e3a

Browse files
authored
bumping llvm to 11 (#7)
1 parent 32f6558 commit d6d2e3a

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

CMakeLists.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,11 @@ set(CLANG_TOOLS_SEARCH_PATH
346346
"/usr/local/bin"
347347
"/usr/bin"
348348
"/usr/local/opt/llvm/bin"
349-
"/usr/local/opt/llvm@8/bin"
350-
"/usr/local/Cellar/llvm/8.0.1/bin"
351349
)
352350

353351
# clang-format
354352
find_program(CLANG_FORMAT_BIN
355-
NAMES clang-format clang-format-8
353+
NAMES clang-format-11
356354
HINTS ${CLANG_TOOLS_SEARCH_PATH})
357355
if ("${CLANG_FORMAT_BIN}" STREQUAL "CLANG_FORMAT_BIN-NOTFOUND")
358356
message(WARNING "JuCC/main couldn't find clang-format.")
@@ -362,7 +360,7 @@ endif()
362360

363361
# clang-tidy
364362
find_program(CLANG_TIDY_BIN
365-
NAMES clang-tidy clang-tidy-8
363+
NAMES clang-tidy-11
366364
HINTS ${CLANG_TOOLS_SEARCH_PATH})
367365
if ("${CLANG_TIDY_BIN}" STREQUAL "CLANG_TIDY_BIN-NOTFOUND")
368366
message(WARNING "JuCC/main couldn't find clang-tidy.")
@@ -409,7 +407,7 @@ unset(${CPPLINT_BIN})
409407
# check-format : Check if the codebase is formatted according to standards.
410408
#######################################################################################################################
411409

412-
find_program(CLANG_FORMAT_BIN NAMES clang-format-8 clang-format HINTS ${CLANG_TOOLS_SEARCH_PATH})
410+
find_program(CLANG_FORMAT_BIN NAMES clang-format-11 HINTS ${CLANG_TOOLS_SEARCH_PATH})
413411
if ("${CLANG_FORMAT_BIN}" STREQUAL "CLANG_FORMAT_BIN-NOTFOUND")
414412
message(STATUS "[MISSING] clang-format not found, no format and no check-format.")
415413
else ()
@@ -453,7 +451,7 @@ unset(CLANG_FORMAT_BIN)
453451
# check-clang-tidy : Run clang-tidy static analysis on the codebase.
454452
#######################################################################################################################
455453

456-
find_program(CLANG_TIDY_BIN NAMES clang-tidy-8 clang-tidy HINTS ${CLANG_TOOLS_SEARCH_PATH})
454+
find_program(CLANG_TIDY_BIN NAMES clang-tidy-11 HINTS ${CLANG_TOOLS_SEARCH_PATH})
457455
if ("${CLANG_TIDY_BIN}" STREQUAL "CLANG_TIDY_BIN-NOTFOUND")
458456
message(STATUS "[MISSING] clang-tidy not found, no check-clang-tidy.")
459457
else ()

script/installation/packages.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313

1414
LINUX_BUILD_PACKAGES=(\
1515
"build-essential" \
16-
"clang" \
17-
"clang-format" \
18-
"clang-tidy" \
16+
"clang-11" \
17+
"clang-format-11" \
18+
"clang-tidy-11" \
1919
"cmake" \
2020
"git" \
21+
"llvm-11" \
2122
"pkg-config" \
2223
"python3-pip" \
2324
"python-is-python3" \

src/include/grammar/grammar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Production {
4646
void SetRules(const std::vector<Rule> &rules) { Production::rules_ = rules; }
4747
};
4848

49-
typedef std::vector<Production> Productions;
49+
using Productions = std::vector<Production>;
5050

5151
class Parser {
5252
std::ifstream file_;

0 commit comments

Comments
 (0)