[PATCH] D157838: [clang-repl] Disambiguate declarations with private typedefs

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 21 02:15:36 PDT 2023


Hahnfeld added inline comments.


================
Comment at: clang/lib/Parse/ParseTentative.cpp:94
+          // involve namespaces and friend declarations.
+          if (NextToken().is(tok::identifier))
+            return true;
----------------
v.g.vassilev wrote:
> I am wondering what is the false positive rate of this change? That is, if we enable incremental parsing by default (in a local build) and then run all tests which do not produce diagnostics. 
With this patch and enabling `IncrementalExtensions` by default, it's at least not worse than current `main`: For all of `check-clang`, I see a number of failing unit tests that start hoarding some memory and are killed with `std::bad_alloc` or are stuck using 100% CPU. Those we probably want to debug independently of this change...


================
Comment at: clang/test/Interpreter/disambiguate-decl-stmt.cpp:74
+// expected-error at -1 2 {{'Inner' is a private member of 'PR13642'}}
+
 // Deduction guide
----------------
v.g.vassilev wrote:
> Could we move the diagnostic-producing cases in a separate file?
We could, but I'm actually not a big fan because it moves the expected failing test away from the related disambiguation tests above...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157838/new/

https://reviews.llvm.org/D157838



More information about the cfe-commits mailing list