From ec8806e8ec513ab190eedcc39337f910e7969196 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 17 Dec 2008 16:19:15 +0000 Subject: Removed the warning warning: statement was disambiguated as declaration because it is currently firing in cases where the declaration would not actually parse as a statement. We'd love to bring this warning back if we can make it more accurate. llvm-svn: 61137 --- clang/lib/Parse/ParseTentative.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'clang/lib/Parse/ParseTentative.cpp') diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp index 3c50884c9ce..f352efa8726 100644 --- a/clang/lib/Parse/ParseTentative.cpp +++ b/clang/lib/Parse/ParseTentative.cpp @@ -126,18 +126,6 @@ bool Parser::isCXXSimpleDeclaration() { TPR = TPResult::True(); assert(TPR == TPResult::True() || TPR == TPResult::False()); - if (TPR == TPResult::True() && Tok.isNot(tok::kw_void)) { - // We have a declaration that looks like a functional cast; there's a high - // chance that the author intended the statement to be an expression. - // Emit a warning. - Diag(Tok, diag::warn_statement_disambiguation) - << "declaration" << SourceRange(Tok.getLocation(), TentativeParseLoc); - } else if (TPR == TPResult::False() && Tok.is(tok::kw_void)) { - // A functional cast to 'void' expression ? Warning.. - Diag(Tok, diag::warn_statement_disambiguation) - << "expression" << SourceRange(Tok.getLocation(), TentativeParseLoc); - } - return TPR == TPResult::True(); } -- cgit v1.2.3