[PATCH] D21301: Detect recursive default argument definition

David Majnemer via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 13 11:13:44 PDT 2016


majnemer added a subscriber: majnemer.
majnemer accepted this revision.
majnemer added a reviewer: majnemer.
majnemer added a comment.
This revision is now accepted and ready to land.

LGTM


================
Comment at: lib/Sema/SemaExpr.cpp:4570
@@ +4569,3 @@
+  // If the default argument expression is not set yet, we are building it now.
+  if (!Param->getInit()) {
+    Diag(Param->getLocStart(), diag::err_recursive_default_argument) << FD;
----------------
I'd make this `!Param->hasInit()`.


http://reviews.llvm.org/D21301





More information about the cfe-commits mailing list