================
@@ -176,7 +176,8 @@ bool ExtractionContext::exprIsValidOutside(const 
clang::Stmt *Scope) const {
   SourceLocation ScopeBegin = Scope->getBeginLoc();
   SourceLocation ScopeEnd = Scope->getEndLoc();
   for (const Decl *ReferencedDecl : ReferencedDecls) {
-    if (SM.isPointWithin(ReferencedDecl->getBeginLoc(), ScopeBegin, ScopeEnd) 
&&
+    if (ReferencedDecl->getBeginLoc().isValid() &&
----------------
HighCommander4 wrote:

(I wondered whether there might be other cases where a `Decl` has an invalid 
location where we'd want this function to return `false`, but I couldn't think 
of a specific case, so I think this is fine for the time being.)

https://github.com/llvm/llvm-project/pull/71162
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to