Commit Graph

3 Commits

Author SHA1 Message Date
Alex Hoppen
e835c4a031 [Refactoring] Fix a crash that occurred when converting if/else of enum with raw value to switch statement
If the enum has a raw value, `E` passed in to `BinaryExpr` is a `DeclRefExpr`, not a `DotSyntaxCallExpr`, so we crashed on `dyn_cast<DotSyntaxCallExpr>(E->getFn())->getFn()`.

Only look through `DotSyntaxCallExpr` if `E` is indeed a `DotSyntaxCallExpr`. While at it, fix a few other potential sources of nullptr crashes.

rdar://84707973
2022-05-02 15:52:24 +02:00
Josh Soref
6fd6b13c56 spelling: unwrapped
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-04-21 15:53:30 -04:00
Vlasov Anton
904bd0bf63 SR-5740 Refactoring action to convert if statement to switch 2020-02-02 12:44:48 +03:00