[PATCH] D29469: Fix PR31843: Clang-4.0 crashes/assert while evaluating __builtin_object_size

Richard Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 10 14:37:03 PST 2017


rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

LGTM, I think this is also OK for Clang 4 if Hans is willing to take it.



================
Comment at: lib/AST/ExprConstant.cpp:607-612
+      /// Evaluate as a constant expression. In certain scenarios, if:
+      /// - We find a MemberExpr with a base that can't be evaluated, or
       /// - We find a variable initialized with a call to a function that has
-      ///   the alloc_size attribute on it.
+      ///   the alloc_size attribute on it
+      ///
+      /// Then we may consider evaluation to have succeeded.
----------------
[nit] "We", "We", "Then" should not be capitalized, and please remove blank line prior to "Then we [...]"


https://reviews.llvm.org/D29469





More information about the cfe-commits mailing list