probinson marked an inline comment as done. ================ 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 { ---------------- majnemer wrote: > 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. Right... for some reason the word 'block' in the comment made me think it was an Objective-C thing. The C-language check is first now.
https://reviews.llvm.org/D22113 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits