[llvm-branch-commits] [MC][profgen][NFC] Expand auto for MCDecodedPseudoProbe (PR #102788)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Aug 10 22:45:12 PDT 2024


================
@@ -657,7 +657,7 @@ MCPseudoProbeDecoder::getCallProbeForAddr(uint64_t Address) const {
   const auto &Probes = It->second;
 
   const MCDecodedPseudoProbe *CallProbe = nullptr;
-  for (const auto &Probe : Probes) {
----------------
WenleiHe wrote:

> Expand autos in select places to trigger type casts. 

Can you explain? auto is a syntax sugar. `Probes` is of type `std::list<MCDecodedPseudoProbe>`, so the deduced type for `auto` is `MCDecodedPseudoProbe`. What type extra casting do you expect by changing from `auto` to explicit type?  

https://github.com/llvm/llvm-project/pull/102788


More information about the llvm-branch-commits mailing list