summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseTentative.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-12-17 16:19:15 +0000
committerDouglas Gregor <dgregor@apple.com>2008-12-17 16:19:15 +0000
commitec8806e8ec513ab190eedcc39337f910e7969196 (patch)
treef38bfc28006c9e7e3aaef83b57be37226e03844c /clang/lib/Parse/ParseTentative.cpp
parentd1a36798b786da2295422387e9bf301f160d40a3 (diff)
downloadbcm5719-llvm-ec8806e8ec513ab190eedcc39337f910e7969196.tar.gz
bcm5719-llvm-ec8806e8ec513ab190eedcc39337f910e7969196.zip
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
Diffstat (limited to 'clang/lib/Parse/ParseTentative.cpp')
-rw-r--r--clang/lib/Parse/ParseTentative.cpp12
1 files changed, 0 insertions, 12 deletions
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();
}
OpenPOWER on IntegriCloud