[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 05:27:34 PST 2019


lebedev.ri added a comment.

Exciting!



================
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.
+};
+
----------------
Would it be better to add them into `ExceptionAnalyzer` class?



================
Comment at: clang-tidy/utils/ExceptionAnalyzer.h:218
   llvm::StringSet<> IgnoredExceptions;
-  llvm::DenseMap<const FunctionDecl *, bool> FunctionCache;
+  std::map<const FunctionDecl *, ExceptionInfo> FunctionCache;
 };
----------------
Why can't `llvm::DenseMap` continue to be used?


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