v.g.vassilev created this revision. v.g.vassilev added reviewers: rsmith, aaron.ballman. Herald added a project: All. v.g.vassilev requested review of this revision.
Repository: rC Clang https://reviews.llvm.org/D148425 Files: clang/lib/Parse/ParseTentative.cpp clang/test/Interpreter/disambiguate-decl-stmt.cpp Index: clang/test/Interpreter/disambiguate-decl-stmt.cpp =================================================================== --- clang/test/Interpreter/disambiguate-decl-stmt.cpp +++ clang/test/Interpreter/disambiguate-decl-stmt.cpp @@ -26,6 +26,10 @@ x.I::~I(); x = 20; +struct Dtor1 {~Dtor1();}; +Dtor1::~Dtor1() { printf("Dtor1\n"); } +Dtor1 d1; + // Ctors // Deduction guide Index: clang/lib/Parse/ParseTentative.cpp =================================================================== --- clang/lib/Parse/ParseTentative.cpp +++ clang/lib/Parse/ParseTentative.cpp @@ -88,10 +88,8 @@ } case tok::kw_operator: return true; - case tok::annot_cxxscope: // Check if this is a dtor. - if (NextToken().is(tok::tilde)) - return true; - break; + case tok::tilde: + return true; default: break; }
Index: clang/test/Interpreter/disambiguate-decl-stmt.cpp =================================================================== --- clang/test/Interpreter/disambiguate-decl-stmt.cpp +++ clang/test/Interpreter/disambiguate-decl-stmt.cpp @@ -26,6 +26,10 @@ x.I::~I(); x = 20; +struct Dtor1 {~Dtor1();}; +Dtor1::~Dtor1() { printf("Dtor1\n"); } +Dtor1 d1; + // Ctors // Deduction guide Index: clang/lib/Parse/ParseTentative.cpp =================================================================== --- clang/lib/Parse/ParseTentative.cpp +++ clang/lib/Parse/ParseTentative.cpp @@ -88,10 +88,8 @@ } case tok::kw_operator: return true; - case tok::annot_cxxscope: // Check if this is a dtor. - if (NextToken().is(tok::tilde)) - return true; - break; + case tok::tilde: + return true; default: break; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits