[PATCH] D22113: C does not have inline variables
David Majnemer via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 14 10:10:07 PDT 2016
majnemer added a subscriber: majnemer.
================
Comment at: lib/Sema/SemaDecl.cpp:6189-6191
@@ -6188,2 +6188,5 @@
<< FixItHint::CreateRemoval(D.getDeclSpec().getInlineSpecLoc());
+ } else if (!getLangOpts().CPlusPlus) {
+ Diag(D.getDeclSpec().getInlineSpecLoc(), diag::err_inline_non_function)
+ << 0;
} else {
----------------
I'd suggest sorting this condition higher. It doesn't make much sense to mention block scopes when inline variables are prohibited in all contexts in C.
https://reviews.llvm.org/D22113
More information about the cfe-commits
mailing list