[PATCH] D39015: [Analyzer] Always use non-reference types when creating expressions in BodyFarm, removes std::call_once crash

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 25 07:19:24 PDT 2017

alexfh added inline comments.

Comment at: cfe/trunk/lib/Analysis/BodyFarm.cpp:366
+        M.makeLvalueToRvalue(D->getParamDecl(i),
+                             /* RefersToEnclosingVariableOrCapture= */ false));
george.karpenkov wrote:
> alexfh wrote:
> > Remove the spaces inside the comment. `/*ParamName=*/value` is the format that is understood by clang-format and the https://clang.llvm.org/extra/clang-tidy/checks/misc-argument-comment.html clang-tidy check. Same elsewhere in this patch.
> yeah, i can do that.
> can we also consider changing `clang-tidy` to ignore those spaces?
I've just looked at the source code, and, apparently, clang-tidy already understands spaces in argument comments already. Sorry for misinforming you. However, clang-format is more strict here and there's also the consistency argument (see the comment on r316539), which I find to be a good motivation to change this (or at least to not introduce more inconsistency).



More information about the cfe-commits mailing list