diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-12-17 16:19:15 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-12-17 16:19:15 +0000 |
commit | 3eb1c546857087b5e1377d172f37868ade960664 (patch) | |
tree | 81a9dea76da3e817c06734132d1fe7017a82347b /lib/Parse/ParseTentative.cpp | |
parent | 5605fdf94cef9e16a9a168b5fb66a3395ba9df42 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseTentative.cpp')
-rw-r--r-- | lib/Parse/ParseTentative.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp index 3c50884c9c..f352efa872 100644 --- a/lib/Parse/ParseTentative.cpp +++ b/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(); } |