[cfe-commits] r167268 - in /cfe/trunk: include/clang/Basic/DiagnosticParseKinds.td include/clang/Parse/Parser.h lib/Parse/ParseExprCXX.cpp test/Parser/colon-colon-parentheses.cpp

Matt Beaumont-Gay matthewbg at google.com
Thu Nov 1 21:02:25 PDT 2012


On Thu, Nov 1, 2012 at 6:08 PM, Richard Trieu <rtrieu at google.com> wrote:
> Author: rtrieu
> Date: Thu Nov  1 20:08:58 2012
> New Revision: 167268
>
> URL: http://llvm.org/viewvc/llvm-project?rev=167268&view=rev
> Log:
> When finding a '(' after '::', emit error with hint to remove '(' and matching
> ')', if found.  Don't crash.
> Fixes PR11852.
>
> Added:
>     cfe/trunk/test/Parser/colon-colon-parentheses.cpp
> Modified:
>     cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
>     cfe/trunk/include/clang/Parse/Parser.h
>     cfe/trunk/lib/Parse/ParseExprCXX.cpp
>
> Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td?rev=167268&r1=167267&r2=167268&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td (original)
> +++ cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td Thu Nov  1 20:08:58 2012
> @@ -348,6 +348,8 @@
>  def warn_cxx98_compat_static_assert : Warning<
>    "static_assert declarations are incompatible with C++98">,
>    InGroup<CXX98Compat>, DefaultIgnore;
> +def err_paren_after_colon_colon : Error<
> +  "unexpected parentheses after '::'">;

Grammar nitpick: this should be "parenthesis" (singular).



More information about the cfe-commits mailing list