You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
marco definition (-D) & include directories (-I)
沒有這些 flags,基本上不可能正確的分析原始碼(畢竟一個標準的 C 編譯器工具鍊都會先用前處理器(preprocessor)來處理上面提到的兩個 flags 所需完成的工作,在編譯器看到時根本不會看到 macro 或是需要尋找 include file 在哪。)
Compilation Database
對各個檔案的編譯指令的紀錄
Fixed compilation database
類似 hard code,將上面提到一些重要的 flags 在使用工具時一併傳進去,但是很明顯地,若要分析大型專案這樣的做法是非常麻煩且沒效率的。
Compilation databases for Clang-based tools
動機 - 忠實重現編譯行為
-D
) & include directories (-I
)沒有這些 flags,基本上不可能正確的分析原始碼(畢竟一個標準的 C 編譯器工具鍊都會先用前處理器(preprocessor)來處理上面提到的兩個 flags 所需完成的工作,在編譯器看到時根本不會看到 macro 或是需要尋找 include file 在哪。)
Compilation Database
DCMAKE_EXPORT_COMPILE_COMMANDS
flagThe text was updated successfully, but these errors were encountered: