[PATCH] D157923: [llvm][NFC] Refactor AutoUpdater experimental case

Nathan Sidwell via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 16 10:55:55 PDT 2023


urnathan marked an inline comment as not done.
urnathan added inline comments.


================
Comment at: llvm/lib/IR/AutoUpgrade.cpp:989
+          Groups.clear();
+          if (R2.match(Name, &Groups))
+            ID = StringSwitch<Intrinsic::ID>(Groups[1])
----------------
arsenm wrote:
> Braces
It doesn't actually matter if V2 is set to true only in the R2.match true case or anywhere in this whole block. (I presume this is what you're querying?)
We're distinguishing whether we got to try the second regexp, and only care about it's value if ID != not_intrinsic.

Do you prefer this placement before the if, so it's clearer we've not missed some bracing?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157923/new/

https://reviews.llvm.org/D157923



More information about the llvm-commits mailing list