summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFaisal Vali <faisalv@yahoo.com>2017-10-15 02:13:17 +0000
committerFaisal Vali <faisalv@yahoo.com>2017-10-15 02:13:17 +0000
commitb7c0b089f26af8150209af173af4c199b9e13531 (patch)
tree09ed2943d06e8af5bfa7296df71e94c2c89a8d5b
parent3f267bf769f169f26dd98d05246cbe75b632f4be (diff)
downloadbcm5719-llvm-b7c0b089f26af8150209af173af4c199b9e13531.tar.gz
bcm5719-llvm-b7c0b089f26af8150209af173af4c199b9e13531.zip
[c++2a] Fix failing regression test related to not adding the extension warning to a diagnostic group (in r315840)
In passing also complete a comment that I left uncompleted. For ease of reference, here's the parent commit: https://reviews.llvm.org/rL315840 llvm-svn: 315842
-rw-r--r--clang/include/clang/Basic/DiagnosticLexKinds.td7
-rw-r--r--clang/include/clang/Lex/TokenLexer.h4
2 files changed, 8 insertions, 3 deletions
diff --git a/clang/include/clang/Basic/DiagnosticLexKinds.td b/clang/include/clang/Basic/DiagnosticLexKinds.td
index 6c35bab88aa..af44771acd0 100644
--- a/clang/include/clang/Basic/DiagnosticLexKinds.td
+++ b/clang/include/clang/Basic/DiagnosticLexKinds.td
@@ -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<
diff --git a/clang/include/clang/Lex/TokenLexer.h b/clang/include/clang/Lex/TokenLexer.h
index c32338b12d8..17305107ca3 100644
--- a/clang/include/clang/Lex/TokenLexer.h
+++ b/clang/include/clang/Lex/TokenLexer.h
@@ -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,
OpenPOWER on IntegriCloud