ahatanak added inline comments.

================
Comment at: clang/lib/Sema/SemaLookup.cpp:1392
-          if (!VisitedUsingDirectives) {
-            // Add using directives from this context up to the top level.
-            for (DeclContext *UCtx = Ctx; UCtx; UCtx = UCtx->getParent()) {
----------------
I noticed that we aren't visiting the contexts from the inside out despite the 
comment here: 
https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaLookup.cpp#L133

```
    // A given context is only every visited once, so it is important
    // that contexts be visited from the inside out in order to get
    // the effective DCs right.
```

But I think that's OK. I haven't been able to come up with an example where 
this is causing a problem.


================
Comment at: clang/lib/Sema/SemaLookup.cpp:1428
   // FIXME:  This really, really shouldn't be happening.
   if (!S) return false;
 
----------------
I think this line can be moved to the beginning of the function .I can try that 
after committing this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147283

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to