[PATCH] D157480: [clang-repl] Disambiguate global namespace identifiers
Jonas Hahnfeld via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 9 04:30:19 PDT 2023
Hahnfeld updated this revision to Diff 548562.
Hahnfeld marked an inline comment as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157480/new/
https://reviews.llvm.org/D157480
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
@@ -34,6 +34,10 @@
Dtor1::~Dtor1() { printf("Dtor1\n"); }
Dtor1 d1;
+struct Dtor2 { ~Dtor2(); };
+::Dtor2::~Dtor2() { printf("Dtor2\n"); }
+Dtor2 d2;
+
struct ANestedDtor { struct A1 { struct A2 { ~A2(); }; }; };
ANestedDtor::A1::A2::~A2() { printf("Dtor A::A1::A2::~A2\n"); }
Index: clang/lib/Parse/ParseTentative.cpp
===================================================================
--- clang/lib/Parse/ParseTentative.cpp
+++ clang/lib/Parse/ParseTentative.cpp
@@ -62,6 +62,7 @@
case tok::kw_static_assert:
case tok::kw__Static_assert:
return true;
+ case tok::coloncolon:
case tok::identifier: {
if (DisambiguatingWithExpression) {
RevertingTentativeParsingAction TPA(*this);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157480.548562.patch
Type: text/x-patch
Size: 949 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230809/bf538a1e/attachment.bin>
More information about the cfe-commits
mailing list