Clang 도구에 대한 전역 환경 설정 구성

Clang-Tidy 및 Clazy를 사용하여 C, C++, Objective-C 프로그램의 문제점 탐지

Clang 도구에 대해 Clang 진단 기능을 전역적으로 구성하려면:

  1. Preferences > Analyzer > Clang Tools 로 이동합니다.

    분석기 환경 설정의 ‘Clang 도구’ 탭

  2. Clang-TidyClazy-Standalone 필드에서 사용할 실행 파일의 경로를 설정합니다.
  3. Diagnostic configuration 필드에는 수행할 검사 항목이 표시됩니다. 이 필드의 값을 선택하면 Diagnostic Configurations 대화 상자가 열리며, 여기서 수행할 검사 항목을 선택하고 편집할 수 있습니다.

    대신 Clang-Tidy 구성 파일에서 검사를 수행하려면 ‘ Prefer .clang-tidy file, if present ’를 선택하십시오.

  4. Clang 도구를 실행하기 전에 프로젝트를 빌드하려면 ‘ Build the project before analysis ’를 선택하십시오. Clang 도구는 분석 전에 프로젝트를 빌드할 것을 요구하지는 않지만, 빌드 과정에서 생성된 파일이 누락되었다는 오해의 소지가 있는 경고를 표시할 수 있습니다. 대규모 프로젝트의 경우, 프로젝트를 빌드하지 않으면 시간을 절약할 수 있습니다.
  5. 열려 있는 문서에 대한 자동 분석을 비활성화하려면 ‘ Analyze open files ’의 선택을 해제하십시오.
  6. ' Parallel jobs ' 필드에서 멀티코어 프로세서에서 분석 속도를 높이기 위해 병렬로 실행할 작업 수를 선택하십시오.

‘Clang 진단 구성’, ‘Clang-Tidy 및 Clazy를 사용한 코드 분석’, ‘Clang 도구 설정 지정’ 및 ‘문제점’항목도 참조하십시오 .

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.