mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Update to clang-format-14 on Ubuntu22.04
This commit is contained in:
parent
1b1907af49
commit
75a70bee6d
10
.github/workflows/format.yml
vendored
10
.github/workflows/format.yml
vendored
@ -10,11 +10,11 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
format:
|
format:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
name: Ubuntu 20.04 | format
|
name: Ubuntu 22.04 | format
|
||||||
env:
|
env:
|
||||||
CI_OS_NAME: linux
|
CI_OS_NAME: linux
|
||||||
CI_RUNS_ON: ubuntu-20.04
|
CI_RUNS_ON: ubuntu-22.04
|
||||||
CI_COMMIT: ${{ github.sha }}
|
CI_COMMIT: ${{ github.sha }}
|
||||||
CI_M32: 0
|
CI_M32: 0
|
||||||
steps:
|
steps:
|
||||||
@ -27,14 +27,14 @@ jobs:
|
|||||||
CI_BUILD_STAGE_NAME: build
|
CI_BUILD_STAGE_NAME: build
|
||||||
run: |
|
run: |
|
||||||
bash ci/ci-install.bash &&
|
bash ci/ci-install.bash &&
|
||||||
sudo apt-get install clang-format-11 yapf3 &&
|
sudo apt-get install clang-format-14 yapf3 &&
|
||||||
git config --global user.email "action@example.com" &&
|
git config --global user.email "action@example.com" &&
|
||||||
git config --global user.name "github action"
|
git config --global user.name "github action"
|
||||||
- name: Format code
|
- name: Format code
|
||||||
run: |
|
run: |
|
||||||
autoconf &&
|
autoconf &&
|
||||||
./configure &&
|
./configure &&
|
||||||
make -j 2 format CLANGFORMAT=clang-format-11 &&
|
make -j 2 format CLANGFORMAT=clang-format-14 &&
|
||||||
git status
|
git status
|
||||||
- name: Push
|
- name: Push
|
||||||
run: |
|
run: |
|
||||||
|
@ -346,13 +346,13 @@ analyzer-include:
|
|||||||
|
|
||||||
format: clang-format yapf format-pl-exec
|
format: clang-format yapf format-pl-exec
|
||||||
|
|
||||||
CLANGFORMAT = clang-format-11
|
CLANGFORMAT = clang-format-14
|
||||||
CLANGFORMAT_FLAGS = -i
|
CLANGFORMAT_FLAGS = -i
|
||||||
CLANGFORMAT_FILES = $(CPPCHECK_CPP) $(CPPCHECK_H) $(CPPCHECK_YL) test_regress/t/*.c* test_regress/t/*.h
|
CLANGFORMAT_FILES = $(CPPCHECK_CPP) $(CPPCHECK_H) $(CPPCHECK_YL) test_regress/t/*.c* test_regress/t/*.h
|
||||||
|
|
||||||
clang-format:
|
clang-format:
|
||||||
@$(CLANGFORMAT) --version | egrep 11.0 > /dev/null \
|
@$(CLANGFORMAT) --version | egrep 14.0 > /dev/null \
|
||||||
|| echo "*** You are not using clang-format 11.0, indents may differ from master's ***"
|
|| echo "*** You are not using clang-format-14, indents may differ from master's ***"
|
||||||
$(CLANGFORMAT) $(CLANGFORMAT_FLAGS) $(CLANGFORMAT_FILES)
|
$(CLANGFORMAT) $(CLANGFORMAT_FLAGS) $(CLANGFORMAT_FILES)
|
||||||
|
|
||||||
PY_PROGRAMS = \
|
PY_PROGRAMS = \
|
||||||
|
@ -13,6 +13,7 @@ from datetime import datetime
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('./_ext'))
|
sys.path.insert(0, os.path.abspath('./_ext'))
|
||||||
|
|
||||||
import sphinx_rtd_theme # pylint: disable=wrong-import-position,
|
import sphinx_rtd_theme # pylint: disable=wrong-import-position,
|
||||||
|
@ -124,7 +124,7 @@ Those developing Verilator itself may also want these (see internals.rst):
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
sudo apt-get install gdb graphviz cmake clang clang-format-11 gprof lcov
|
sudo apt-get install gdb graphviz cmake clang clang-format-14 gprof lcov
|
||||||
sudo apt-get install yapf3
|
sudo apt-get install yapf3
|
||||||
sudo pip3 install sphinx sphinx_rtd_theme sphinxcontrib-spelling breathe
|
sudo pip3 install sphinx sphinx_rtd_theme sphinxcontrib-spelling breathe
|
||||||
cpan install Pod::Perldoc
|
cpan install Pod::Perldoc
|
||||||
|
@ -16,12 +16,13 @@ from shutil import copy2
|
|||||||
|
|
||||||
|
|
||||||
class VlFileCopy:
|
class VlFileCopy:
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
verilator_args, # presently all verilator options are passed-thru
|
verilator_args, # presently all verilator options are passed-thru
|
||||||
# ideally this script would check against options mentioned in help
|
# ideally this script would check against options mentioned in help
|
||||||
debug=0,
|
debug=0,
|
||||||
output_dir='copied'): # directory name we output file uses
|
output_dir='copied'): # directory name we output file uses
|
||||||
|
|
||||||
self.debug = debug
|
self.debug = debug
|
||||||
|
|
||||||
|
@ -14,12 +14,13 @@ import xml.etree.ElementTree as ET
|
|||||||
|
|
||||||
|
|
||||||
class VlHierGraph:
|
class VlHierGraph:
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
verilator_args, # presently all verilator options are passed-thru
|
verilator_args, # presently all verilator options are passed-thru
|
||||||
# ideally this script would check against options mentioned in help
|
# ideally this script would check against options mentioned in help
|
||||||
debug=0,
|
debug=0,
|
||||||
output_filename='graph.dot'): # output filename
|
output_filename='graph.dot'): # output filename
|
||||||
self.debug = debug
|
self.debug = debug
|
||||||
self.next_vertex_number = 0
|
self.next_vertex_number = 0
|
||||||
self.name_to_number = {}
|
self.name_to_number = {}
|
||||||
|
@ -96,7 +96,7 @@ public:
|
|||||||
*(reinterpret_cast<uint32_t*>(newp)) = activeMagic();
|
*(reinterpret_cast<uint32_t*>(newp)) = activeMagic();
|
||||||
return newp + 8;
|
return newp + 8;
|
||||||
}
|
}
|
||||||
static void operator delete(void* obj, size_t /*size*/)VL_MT_SAFE {
|
static void operator delete(void* obj, size_t /*size*/) VL_MT_SAFE {
|
||||||
uint8_t* const oldp = (static_cast<uint8_t*>(obj)) - 8;
|
uint8_t* const oldp = (static_cast<uint8_t*>(obj)) - 8;
|
||||||
if (VL_UNLIKELY(*(reinterpret_cast<uint32_t*>(oldp)) != activeMagic())) {
|
if (VL_UNLIKELY(*(reinterpret_cast<uint32_t*>(oldp)) != activeMagic())) {
|
||||||
VL_FATAL_MT(__FILE__, __LINE__, "",
|
VL_FATAL_MT(__FILE__, __LINE__, "",
|
||||||
|
@ -12,6 +12,7 @@ import textwrap
|
|||||||
|
|
||||||
|
|
||||||
class Node:
|
class Node:
|
||||||
|
|
||||||
def __init__(self, name, superClass, file, lineno):
|
def __init__(self, name, superClass, file, lineno):
|
||||||
self._name = name
|
self._name = name
|
||||||
self._superClass = superClass
|
self._superClass = superClass
|
||||||
@ -180,6 +181,7 @@ Stages = {}
|
|||||||
|
|
||||||
|
|
||||||
class Cpt:
|
class Cpt:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.did_out_tree = False
|
self.did_out_tree = False
|
||||||
self.in_filename = ""
|
self.in_filename = ""
|
||||||
|
@ -24,8 +24,8 @@
|
|||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
#include "V3Number.h"
|
#include "V3Number.h"
|
||||||
#include "V3ParseImp.h" // Defines YYTYPE; before including bison header
|
|
||||||
#include "V3ParseBison.h" // Generated by bison
|
#include "V3ParseBison.h" // Generated by bison
|
||||||
|
#include "V3ParseImp.h" // Defines YYTYPE; before including bison header
|
||||||
|
|
||||||
#define STATE_VERILOG_RECENT S17 // State name for most recent Verilog Version
|
#define STATE_VERILOG_RECENT S17 // State name for most recent Verilog Version
|
||||||
|
|
||||||
|
@ -23,12 +23,12 @@
|
|||||||
#endif
|
#endif
|
||||||
// clang-format on
|
// clang-format on
|
||||||
#include "V3Ast.h"
|
#include "V3Ast.h"
|
||||||
#include "V3Global.h"
|
|
||||||
#include "V3Config.h"
|
#include "V3Config.h"
|
||||||
|
#include "V3Global.h"
|
||||||
#include "V3ParseImp.h" // Defines YYTYPE; before including bison header
|
#include "V3ParseImp.h" // Defines YYTYPE; before including bison header
|
||||||
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
|
#include <cstdlib>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
|
|
||||||
#define YYERROR_VERBOSE 1 // For prior to Bison 3.6
|
#define YYERROR_VERBOSE 1 // For prior to Bison 3.6
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
// General headers
|
// General headers
|
||||||
#include "verilated.h"
|
#include "verilated.h"
|
||||||
|
|
||||||
#include "systemc.h"
|
#include "systemc.h"
|
||||||
|
|
||||||
VM_PREFIX* ap;
|
VM_PREFIX* ap;
|
||||||
|
Loading…
Reference in New Issue
Block a user