[PATCH] D45839: [analyzer] Add support for WebKit "unified sources".

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 23 12:52:51 PDT 2018


NoQ marked 2 inline comments as done.
NoQ added inline comments.


================
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h:145-147
+      if (Name.endswith_lower(".c") || Name.endswith_lower(".cpp") ||
+          Name.endswith_lower(".cc") || Name.endswith_lower(".cxx") ||
+          Name.endswith_lower(".m") || Name.endswith_lower(".mm")) {
----------------
george.karpenkov wrote:
> NoQ wrote:
> > majnemer wrote:
> > > C++ source code is also found in files which end in .C, this code will match against strange file endings like .cXx and .mM
> > > 
> > > I think the above logic should be changed to match https://github.com/llvm-mirror/clang/blob/master/lib/Frontend/FrontendOptions.cpp#L27
> > Aha, yeah, thanks, that's the place i was looking for.
> Why not just use the included function then? It's static.
Because it has a different purpose:
> `for now it doesn't discriminate between code and header files`


https://reviews.llvm.org/D45839





More information about the cfe-commits mailing list