================
@@ -124,13 +130,28 @@ class ExceptionAnalyzer {
/// after filtering.
bool ContainsUnknown;
+ /// True if the entity is determined to be Throwing due to an unknown
cause,
+ /// based on analyzer configuration.
+ bool ThrowsUnknown = false;
+
/// 'ThrownException' is empty if the 'Behaviour' is either 'NotThrowing'
or
/// 'Unknown'.
Throwables ThrownExceptions;
};
ExceptionAnalyzer() = default;
+ enum class UnknownHandlingBehavior { Ignore, TreatAsThrowing };
+
+ void setUnannotatedFunctionsBehavior(UnknownHandlingBehavior Behavior) {
+ AssumeUnannotatedFunctionsAsThrowing =
+ Behavior == UnknownHandlingBehavior::TreatAsThrowing;
+ }
+ void setMissingDefinitionsBehavior(UnknownHandlingBehavior Behavior) {
+ AssumeMissingDefinitionsFunctionsAsThrowing =
+ Behavior == UnknownHandlingBehavior::TreatAsThrowing;
+ }
----------------
zeyi2 wrote:
Fixed, thanks for reviewing!
https://github.com/llvm/llvm-project/pull/168324
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits