[PATCH] D57883: [clang-tidy] refactor ExceptionAnalyzer further to give ternary answer

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 7 09:13:19 PST 2019


lebedev.ri added inline comments.


================
Comment at: clang-tidy/utils/ExceptionAnalyzer.h:31-192
+enum class ExceptionState : std::int8_t {
+  Throwing,    ///< The function can definitly throw given an AST.
+  NotThrowing, ///< This function can not throw, given an AST.
+  Unknown,     ///< This can happen for extern functions without available
+               ///< definition.
+};
+
----------------
JonasToth wrote:
> lebedev.ri wrote:
> > Would it be better to add them into `ExceptionAnalyzer` class?
> > 
> `ThrownExceptions`? I think it fits here. Removing would shrink `ExceptionInfo` (and `ContainsUnknown` and `State` could be packed into one byte) which is a plus.
No, i meant all these classes/enums.
```
class ExceptionAnalyzer {
public:
enum class ExceptionState : std::int8_t {
....
}


class ExceptionInfo {
....
}

} // class ExceptionAnalyzer
```


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D57883





More information about the cfe-commits mailing list