jyu2 marked 12 inline comments as done.
jyu2 added inline comments.

================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6341
+    : Warning<"%0 has a non-throwing exception specification but can still "
+      "throw, may result in unexpected program termination.">, 
+      InGroup<Exceptions>;
----------------
aaron.ballman wrote:
> throw, may -> throw, which may
> 
> Also, remove the period at the end of the diagnostic.
use you suggested.


================
Comment at: lib/Sema/AnalysisBasedWarnings.cpp:290
+
+static bool mayThrowBeCaughted(const CXXThrowExpr *Throw,
+                               const CXXCatchStmt *Catch) {
----------------
aaron.ballman wrote:
> Caughted -> Caught
:-(


================
Comment at: lib/Sema/AnalysisBasedWarnings.cpp:304
+  if (CaughtAsRecordType && ThrowTypeAsRecordType) {
+    if (CaughtAsRecordType == ThrowTypeAsRecordType)
+      MayCaught = true;
----------------
aaron.ballman wrote:
> This does not seem quite correct. Consider:
> ```
> struct S{};
> 
> void f() {
>   try {
>     throw S{};
>   } catch (const S *s) {
>   }
> }
> ```
Good catch.  Remove that check.


https://reviews.llvm.org/D33333



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to