autofix-type-conversion
Fixes type mismatch errors by adding appropriate casts or conversions.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Fixes type mismatch errors by adding appropriate casts or conversions.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Comprehensive build error repair tool for C++, Rust, and Java projects using Soong, GN, Make, or CMake. Automatically fixes 30+ types of errors including headers, linking, APIs, and config.
Fixes function call errors with wrong number or type of arguments.
Fixes syntax errors in Android.bp files.
Removes unsupported or unknown compiler flags from build configurations.
Fixes scope and variable errors in BUILD.gn files.
Fixes script permission errors by making files executable.
| name | autofix-type-conversion |
| description | Fixes type mismatch errors by adding appropriate casts or conversions. |
Fixes compilation errors related to incompatible type assignments or conversions.
cannot convert 'X' to 'Y'invalid conversion from 'X' to 'Y'no viable conversionincompatible typesExtract:
| From | To | Fix |
|---|---|---|
std::string | const char* | .c_str() |
const char* | std::string | Constructor or assignment |
int | enum | static_cast<EnumType>(val) |
void* | T* | static_cast<T*>(ptr) |
Base* | Derived* | dynamic_cast<Derived*>(base) |
int64_t | int | static_cast<int>(val) (with care) |
Example: string to const char*
// Before (error)
void log(const char* msg);
std::string message = "Hello";
log(message); // ERROR
// After
log(message.c_str());
Example: enum cast
// Before
int value = 5;
MyEnum e = value; // ERROR
// After
MyEnum e = static_cast<MyEnum>(value);
Ensure semantic correctness, not just compilation success.