[PATCH] D51426: [Sema] Prohibit function-scope compound literals with address spaces.

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 29 09:50:21 PDT 2018


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

LGTM, with one minor suggestion.



================
Comment at: lib/Sema/SemaExpr.cpp:5745
+    // C99 6.5.2.5p6: Function scope compound literals must have automatic
+    // storage which generally excludes address space-qualified ones.
+    Diag(LParenLoc, diag::err_compound_literal_with_address_space)
----------------
Usually when we mention a standard section like this, it's a prelude to a quote.  If you're just paraphrasing, I think we can trust people to find the right standard section.


Repository:
  rC Clang

https://reviews.llvm.org/D51426





More information about the cfe-commits mailing list