]> granicus.if.org Git - clang/commitdiff
[c++2a] Fix failing regression test related to not adding the extension warning to...
authorFaisal Vali <faisalv@yahoo.com>
Sun, 15 Oct 2017 02:13:17 +0000 (02:13 +0000)
committerFaisal Vali <faisalv@yahoo.com>
Sun, 15 Oct 2017 02:13:17 +0000 (02:13 +0000)
In passing also complete a comment that I left uncompleted.

For ease of reference, here's the parent commit: https://reviews.llvm.org/rL315840

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315842 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticLexKinds.td
include/clang/Lex/TokenLexer.h

index 6c35bab88aae37e54271002e523fde679344aabe..af44771acd06a1b3818ffc67d3d7a2cb48397564 100644 (file)
@@ -347,8 +347,11 @@ def ext_pp_comma_expr : Extension<"comma operator in operand of #if">;
 def ext_pp_bad_vaargs_use : Extension<
   "__VA_ARGS__ can only appear in the expansion of a C99 variadic macro">;
 
-def ext_pp_bad_vaopt_use : Extension<
-  "__VA_OPT__ can only appear in the expansion of a variadic macro">;
+def ext_pp_bad_vaopt_use
+    : ExtWarn<
+          "__VA_OPT__ can only appear in the expansion of a variadic macro">,
+      InGroup<VariadicMacros>;
+
 def err_pp_missing_lparen_in_vaopt_use : Error<
   "missing '(' following __VA_OPT__">;
 def err_pp_vaopt_nested_use : Error<
index c32338b12d86db58288fcf1b0a0909e14a0e689a..17305107ca3bc6a290d500e7f6e8c82e1db1c664 100644 (file)
@@ -201,7 +201,9 @@ private:
   /// the tokens just expanded through __VA_OPT__ processing.  These (sub)
   /// sequence of tokens are folded into one stringified token.
   ///
-  /// \param[in] VCtx - contains information about the  
+  /// \param[in] VCtx - contains relevent contextual information about the
+  /// state of the tokens around and including the __VA_OPT__ token, necessary
+  /// for stringification.
 
   void stringifyVAOPTContents(SmallVectorImpl<Token> &ReplacementToks,
                               const VAOptExpansionContext &VCtx,