Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Analyze Embarcadero RAD Studio project with clang analyzer

I would like to know is it possible to analyze Embarcadero RAD Studio C++ project with Clang Static Analyzer. As far as I understand I need a makefile or something any and ability to build the project with clang. But Embarcadero uses it's own C++ extension, so code can't be compiled with clang.

If analyzing is possible (at least for separate files) it would be good if someone post a sequence of steps what I need to do.

like image 295
αλεχολυτ Avatar asked Dec 04 '17 12:12

αλεχολυτ


2 Answers

Just found out that since RadStudio XE2, it has integrated C++ Analyzer.

From my initial tests, in RadStudio 10.2 it seems to be based on Clang Static Analyzer (not 100% sure)

Here is video instructions for XE2 https://edn.embarcadero.com/article/41862 In Tokyo you access it from menu View->Tool Windows->C++ Analyzer.

My preliminary results are: very slow but pretty helpful results with lots of possible tweaking.

like image 93
Niki Avatar answered Sep 24 '22 08:09

Niki


You can try CppDepend which use Clang and Clang-Tidy to report all the issues reported by them.

However you have to use the BuildMonitor tool to intercept your compilation and link commands before analyze it with CppDepend.

like image 35
James from CppDepend Team Avatar answered Sep 26 '22 08:09

James from CppDepend Team