NoQ accepted this revision.
NoQ added a comment.

Looks great, let's land? Not sure if i already asked - am i understanding 
correctly that this is a "poor-man's" support for macro expansions for tools 
that read plists but do not support those new plist macro dictionaries yet? 
Also i wanted to have `-analyzer-output=text` tests in order to easily see how 
exactly macro expansions turn into events, but i guess it doesn't make sense 
because this feature is only for `-analyzer-output=plist` because other outputs 
have their own mechanisms for handling macros so nvm^^

I wonder how expansions of huge macros will look as events.



================
Comment at: lib/StaticAnalyzer/Core/PlistDiagnostics.cpp:287-288
+    ReportEvent(o, PathDiagnosticEventPiece(P.getLocation(),
+                     llvm::Twine("Expanding macro '" + EI.MacroName + "' to '" 
+
+                                 EI.Expansion + "'").str()),
+                FM, PP, indent, depth);
----------------
I think the proper way of using `Twine` is to only wrap the first value with 
it. Otherwise string concatenation is done normally and then a single string is 
converted into a `Twine`, which doesn't give any benefits.


https://reviews.llvm.org/D52790



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to