mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 05:22:45 +00:00 
			
		
		
		
	 b33b950e45
			
		
	
	
		b33b950e45
		
	
	
	
	
		
			
			This is implemented as a Clang frontend tool, and currently does two
things:
  - Ensure for all fields wrapped in {Nonnull,}GCPtr<T>, T inherits from
    JS::Cell
  - Ensure for all fields not wrapped in {Nonnull,}GCPtr, that the type
    does not inherit from JS::Cell (otherwise it should be wrapped in a
    Ptr class).
In the future, this tool could be extended further. For example, we may
consider validating all implementations of Cell::visit_impl.
		
	
			
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			552 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			552 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
| cmake_minimum_required(VERSION 3.24)
 | |
| 
 | |
| project(LibJSGCVerifier C CXX)
 | |
| 
 | |
| find_package(Clang CONFIG REQUIRED HINTS "../../../../Toolchain/Local/clang")
 | |
| 
 | |
| add_executable(LibJSGCVerifier src/main.cpp src/CellsHandler.cpp)
 | |
| 
 | |
| target_include_directories(LibJSGCVerifier SYSTEM PRIVATE ${CLANG_INCLUDE_DIRS} ${LLVM_INCLUDE_DIRS})
 | |
| target_compile_features(LibJSGCVerifier PRIVATE cxx_std_20)
 | |
| target_link_libraries(LibJSGCVerifier PRIVATE clangTooling)
 | |
| 
 | |
| target_compile_options(LibJSGCVerifier PRIVATE
 | |
|     -Wall
 | |
|     -Wextra
 | |
|     -Werror
 | |
|     -Wno-unused
 | |
|     -fno-rtti
 | |
| )
 |