{"push_id":2878532160,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"2530891b27d48e6e2b153e0f59ea286afdbc2200","before":"ccd349c348ad7930306dfc07c49e74c83d3f40bb","commits":[{"sha":"2530891b27d48e6e2b153e0f59ea286afdbc2200","author":{"name":"Shuai Wang","email":"476ba67776247db0d8c0dd5afcb88ee8d9c4dd67@google.com"},"message":"[analyzer] Handle forwarding reference better in ExprMutationAnalyzer.\n\nSummary:\nWe used to treat an `Expr` mutated whenever it's passed as non-const\nreference argument to a function. This results in false positives in\ncases like this:\n```\nint x;\nstd::vector<int> v;\nv.emplace_back(x); // `x` is passed as non-const reference to `emplace_back`\n```\nIn theory the false positives can be suppressed with\n`v.emplace_back(std::as_const(x))` but that's considered overly verbose,\ninconsistent with existing code and spammy as diags.\n\nThis diff handles such cases by following into the function definition\nand see whether the argument is mutated inside.\n\nReviewers: lebedev.ri, JonasToth, george.karpenkov\n\nSubscribers: xazax.hun, szepet, a.sidorin, mikhail.ramalho, Szelethus, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D52008\n\ngit-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342271 91177308-0d34-0410-b5e6-96231b3b80d8","distinct":true,"url":"https://api.github.com/repos/llvm-mirror/clang/commits/2530891b27d48e6e2b153e0f59ea286afdbc2200"}]}
{"actor":{"display_login":"dtzWill"}}